Changeset 1040
- Timestamp:
- 09/17/08 09:02:57 (4 months ago)
- Files:
-
- trunk/customer/A2B_entity_callerid.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/customer/A2B_entity_callerid.php
r1038 r1040 29 29 $QUERY = "SELECT count(*) FROM cc_callerid WHERE id_cc_card='".$_SESSION["card_id"]."'"; 30 30 $result = $instance_sub_table -> SQLExec ($HD_Form -> DBHandle, $QUERY, 1); 31 32 31 // CHECK IF THE AMOUNT OF CALLERID IS LESS THAN THE LIMIT 33 32 if ($result[0][0] < $A2B->config["webcustomerui"]['limit_callerid']){ 34 35 33 $QUERY = "INSERT INTO cc_callerid (id_cc_card, cid) VALUES ('".$_SESSION["card_id"]."', '".$add_callerid."')"; 36 34 $result = $instance_sub_table -> SQLExec ($HD_Form -> DBHandle, $QUERY, 0); 37 38 35 } 39 36 } … … 57 54 $smarty->display( 'main.tpl'); 58 55 59 60 61 56 if ($form_action == "list") 62 57 { … … 65 60 if (strlen($_GET["menu"])>0) $_SESSION["menu"] = $_GET["menu"]; 66 61 67 68 62 if (isset($update_msg) && strlen($update_msg)>0) echo $update_msg; 63 64 if(sizeof($list)<$A2B->config["webcustomerui"]['limit_callerid']){ 69 65 70 66 ?> 71 </center>67 72 68 <table align="center" border="0" width="55%" class="bgcolor_006"> 73 69 <form name="theForm" action="<?php $_SERVER["PHP_SELF"]?>"> … … 82 78 </td> 83 79 </tr> 84 </form>80 </form> 85 81 </table> 86 82 <br> 87 83 <?php 84 }else{ 85 86 ?> 87 <table align="center" border="0" width="70%" class="bgcolor_006"> 88 <tr class="bgcolor_001" > 89 <td align="center" valign="middle"> 90 <b><i> <?php echo gettext("You cannot add more CallerID. Please delete one before");?> </i> </b> 91 <br/> 92 <?php echo gettext("Max CallerId");?> : <?php echo $A2B->config["webcustomerui"]['limit_callerid'] ?> 93 </td> 94 </tr> 95 </table> 96 <?php 97 } 88 98 // END END END My code for Creating two functionalities in a page 89 99 }
