Changeset 2776
- Timestamp:
- 03/09/10 16:56:30 (2 years ago)
- Files:
-
- trunk/admin/Public/A2B_call_archiving.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/admin/Public/A2B_call_archiving.php
r2421 r2776 39 39 40 40 41 if (! has_rights (ACX_MAINTENANCE)) {41 if (! has_rights (ACX_MAINTENANCE)) { 42 42 Header ("HTTP/1.0 401 Unauthorized"); 43 43 Header ("Location: PP_error.php?c=accessdenied"); … … 85 85 $HD_Form -> FieldViewElement ($FG_COL_QUERY); 86 86 87 if ($posted==1) {87 if ($posted==1) { 88 88 $SQLcmd = ''; 89 89 $SQLcmd = do_field($SQLcmd, 'src', 'src'); … … 164 164 } 165 165 166 if ($_SESSION["is_admin"]==0){167 if (strlen($HD_Form -> FG_TABLE_CLAUSE)>0) $HD_Form -> FG_TABLE_CLAUSE.=" AND ";168 $HD_Form -> FG_TABLE_CLAUSE.="cardID=t2.IDCust AND t2.IDmanager='".$_SESSION["pr_reseller_ID"]."'";169 }170 171 166 //To select just terminatecauseid=ANSWER 172 if (!isset($terminatecauseid)) {167 if (!isset($terminatecauseid)) { 173 168 $terminatecauseid="ANSWER"; 174 169 } … … 184 179 if(isset($archive) && !empty($archive)){ 185 180 $condition = $_SESSION['ss_calllist']; 186 if (strpos($condition,'WHERE') <= 0){187 $condition = " WHERE $condition";188 }189 $rec = archive_data($condition, "call");190 if($rec > 0)191 $archive_message = "The data has been successfully archived";181 if (strlen($condition) && strpos($condition,'WHERE') === false){ 182 $condition = " WHERE $condition"; 183 } 184 $rec = archive_data($condition, "call"); 185 if($rec > 0) 186 $archive_message = "The data has been successfully archived"; 192 187 } 193 188 194 189 $smarty->display('main.tpl'); 190 195 191 ?> 196 192 … … 484 480 </tr> 485 481 </tbody></table> 486 </ FORM>482 </form> 487 483 </center> 488 484 … … 490 486 <!-- ** ** ** ** ** Displaying the Archiving message, calls list and Archive action button and link ** ** ** ** ** --> 491 487 <?php 492 if(isset($archive) && !empty($archive)){ 488 489 if(isset($archive) && !empty($archive)) { 493 490 $HD_Form -> CV_NO_FIELDS = ""; 494 491 print "<div align=\"center\">".$archive_message."</div>"; 495 492 } 493 496 494 if (!isset($form_action)) $form_action="list"; //ask-add 497 495 if (!isset($action)) $action = $form_action; … … 499 497 $list = $HD_Form -> perform_action($form_action); 500 498 501 $HD_Form -> create_form ($form_action, $list, $id=null) ; 502 $smarty->display('footer.tpl'); 503 ?> 499 $HD_Form -> create_form ($form_action, $list, $id=null) ; 500 501 $smarty->display('footer.tpl'); 502
