Changeset 886
- Timestamp:
- 07/13/08 00:08:02 (2 months ago)
- Files:
-
- (root) (modified) (1 prop)
- branches/1.3/A2Billing_UI/Public/A2B_entity_card.php (modified) (2 diffs)
- branches/1.3/A2Billing_UI/Public/process_refill.php (added)
- trunk/admin/Public/A2B_entity_card.php (modified) (2 diffs)
- trunk/admin/Public/process_refill.php (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
- Property svn:ignore set to
My Patches
- Property svn:ignore set to
branches/1.3/A2Billing_UI/Public/A2B_entity_card.php
r7 r886 74 74 /********************************* END BATCH UPDATE ***********************************/ 75 75 76 77 if (($form_action == "addcredit") && ($addcredit>0 || $addcredit<0) && ($id>0 || $cardnumber>0)){78 79 $instance_table = new Table("cc_card", "username, id");80 81 if ($cardnumber>0){82 /* CHECK IF THE CARDNUMBER IS ON THE DATABASE */83 $FG_TABLE_CLAUSE_card = "username='".$cardnumber."'";84 $list_tariff_card = $instance_table -> Get_list ($HD_Form -> DBHandle, $FG_TABLE_CLAUSE_card, null, null, null, null, null, null);85 if ($cardnumber == $list_tariff_card[0][0]) $id = $list_tariff_card[0][1];86 }87 88 if ($id>0){89 90 $param_update .= "credit = credit + '".$addcredit."'";91 if ($HD_Form->FG_DEBUG == 1) echo "<br><hr> $param_update";92 93 $FG_EDITION_CLAUSE = " id='$id'";94 95 if ($HD_Form->FG_DEBUG == 1) echo "<br>-----<br>$param_update<br>$FG_EDITION_CLAUSE";96 $instance_table -> Update_table ($HD_Form -> DBHandle, $param_update, $FG_EDITION_CLAUSE, $func_table = null);97 98 $field_insert = "date, credit, card_id";99 $value_insert = "now(), '$addcredit', '$id'";100 $instance_sub_table = new Table("cc_logrefill", $field_insert);101 $result_query = $instance_sub_table -> Add_table ($HD_Form -> DBHandle, $value_insert, null, null);102 103 if (!$result_query ){104 $update_msg ="<b>".$instance_sub_table -> errstr."</b>";105 }106 }107 }108 109 if ($form_action == "addcredit") $form_action='list';110 111 112 76 if ($id!="" || !is_null($id)){ 113 77 $HD_Form -> FG_EDITION_CLAUSE = str_replace("%id", "$id", $HD_Form -> FG_EDITION_CLAUSE); … … 169 133 <input class="form_enter" name="addcredit" size="18" maxlength="6" value=""> 170 134 <input class="form_input_button" 171 TYPE="button" VALUE="<?php echo gettext("ADD CREDIT TO THE SELECTED CARD");?>" onClick="openURL(' <?php echo $_SERVER['PHP_SELF']?>?form_action=addcredit&stitle=Card_Refilled¤t_page=<?php echo $current_page?>&order=<?php echo $order?>&sens=<?php echo $sens?>&id=')">135 TYPE="button" VALUE="<?php echo gettext("ADD CREDIT TO THE SELECTED CARD");?>" onClick="openURL('process_refill.php?form_action=addcredit&stitle=Card_Refilled¤t_page=<?php echo $current_page?>&order=<?php echo $order?>&sens=<?php echo $sens?>&id=')"> 172 136 </td></form> 173 137 </tr> trunk/admin/Public/A2B_entity_card.php
r882 r886 75 75 /********************************* END BATCH UPDATE ***********************************/ 76 76 77 78 if (($form_action == "addcredit") && ($addcredit>0 || $addcredit<0) && ($id>0 || $cardnumber>0)) {79 80 $instance_table = new Table("cc_card", "username, id");81 82 if ($cardnumber>0){83 /* CHECK IF THE CARDNUMBER IS ON THE DATABASE */84 $FG_TABLE_CLAUSE_card = "username='".$cardnumber."'";85 $list_tariff_card = $instance_table -> Get_list ($HD_Form -> DBHandle, $FG_TABLE_CLAUSE_card, null, null, null, null, null, null);86 if ($cardnumber == $list_tariff_card[0][0]) $id = $list_tariff_card[0][1];87 }88 89 if ($id>0){90 91 $param_update .= "credit = credit + '".$addcredit."'";92 if ($HD_Form->FG_DEBUG == 1) echo "<br><hr> $param_update";93 94 $FG_EDITION_CLAUSE = " id='$id'";95 96 if ($HD_Form->FG_DEBUG == 1) echo "<br>-----<br>$param_update<br>$FG_EDITION_CLAUSE";97 $instance_table -> Update_table ($HD_Form -> DBHandle, $param_update, $FG_EDITION_CLAUSE, $func_table = null);98 99 $field_insert = "date, credit, card_id , description";100 $value_insert = "now(), '$addcredit', '$id', '$description' ";101 $instance_sub_table = new Table("cc_logrefill", $field_insert);102 $result_query = $instance_sub_table -> Add_table ($HD_Form -> DBHandle, $value_insert, null, null);103 104 if (!$result_query ){105 $update_msg ="<b>".$instance_sub_table -> errstr."</b>";106 }107 }108 }109 110 if ($form_action == "addcredit") $form_action='list';111 112 113 77 if ($id!="" || !is_null($id)){ 114 78 $HD_Form -> FG_EDITION_CLAUSE = str_replace("%id", "$id", $HD_Form -> FG_EDITION_CLAUSE); … … 192 156 <td colspan="2" align="center"> 193 157 <input class="form_input_button" 194 TYPE="button" VALUE="<?php echo gettext("ADD CREDIT TO THE SELECTED CARD");?>" onClick="openURL(' <?php echo $_SERVER['PHP_SELF']?>?form_action=addcredit&stitle=Card_Refilled¤t_page=<?php echo $current_page?>&order=<?php echo $order?>&sens=<?php echo $sens?>&id=')">158 TYPE="button" VALUE="<?php echo gettext("ADD CREDIT TO THE SELECTED CARD");?>" onClick="openURL('process_refill.php?form_action=addcredit&stitle=Card_Refilled¤t_page=<?php echo $current_page?>&order=<?php echo $order?>&sens=<?php echo $sens?>&id=')"> 195 159 196 160 </td>
