"; echo''; if(isset($_POST['title']) && isset($_POST['msg'])){ $table_name = "sms_tpl"; $DB_AUTOQUERY = ($_POST['update_id']>0) ? DB_AUTOQUERY_UPDATE : DB_AUTOQUERY_INSERT; $fields_values = array('title'=>$_POST['title'],'msg'=>$_POST['msg']); $setup->db->autoExecute($table_name,$fields_values,$DB_AUTOQUERY,"id={$_POST['update_id']}"); //header("location: /admin.php/sms_tpl/"); echo ""; } if(isset($_GET['delete_tpl_ID']) && $_GET['delete_tpl_ID']>0){ $setup->db->query("delete from sms_tpl where id=?",array($_GET['delete_tpl_ID'])); } if(isset($_GET['updateID']) && $_GET['updateID']>0){ $row_tpl = $setup->db->getRow("select * from sms_tpl where id=?",array($_GET['updateID']),DB_FETCHMODE_ASSOC); } $res = $setup->db->getAll("select * from sms_tpl",array(),DB_FETCHMODE_ASSOC); print'
".$row['title']." |