All pastes #547681 Raw Edit

Miscellany

public php v1 · immutable
·published 2007-06-07 13:43 UTC
rendered paste body
    foreach($rates as $k=>$n) {      $rrow = $rate->getRate($n);      $rinfo = array(        'id' => $rrow['rateid'],        'rate' => $rrow['rate'],        'rateflat' => $rrow['rateflat'],        'time1' => $html_time_1,        'time2' => $html_time_2      );      $rate_ids[] = $rrow['rateid'];      $edit_rates .= edit_rate(0, $rinfo);    }    $edit_rates .=      '<script language="javascript" type="text/javascript">'."\n".      'var togglers = {'."\n".      '  init : function() {'."\n";    foreach($rate_ids as $jid) {      $edit_rates .=        '    addEvent($(\'control'.$jid.'\'),\'click\',this.run'.$jid.');'."\n";    }    $edit_rates .= '  },'."\n";    foreach($rate_ids as $jid) {      $edit_rates .=        '  run'.$jid.' : function() {'."\n".        '    toggle(\'rate'.$jid.'\');'."\n".        '  },'."\n";    }    $edit_rates .= '}'."\n".'</script>';    $rinfo = array(      'id' => 0,      'time1' => $html_time_1,      'time2' => $html_time_2    );