当前位置: 首页>>代码示例>>PHP>>正文


PHP SSP::simple方法代码示例

本文整理汇总了PHP中SSP::simple方法的典型用法代码示例。如果您正苦于以下问题:PHP SSP::simple方法的具体用法?PHP SSP::simple怎么用?PHP SSP::simple使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SSP的用法示例。


在下文中一共展示了SSP::simple方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_rkakl_view

 function get_rkakl_view($table, $primaryKey, $columns)
 {
     $config = new config();
     $sql_details = $config->sql_details();
     require 'ssp.class.php';
     echo json_encode(SSP::simple($_POST, $sql_details, $table, $primaryKey, $columns, date("Y")));
 }
开发者ID:datadigicore,项目名称:siprisdik,代码行数:7,代码来源:datatable.php

示例2: ajax_list

 public function ajax_list($limit = 0)
 {
     $post = $this->input->post();
     $export = false;
     if (isset($post["isExport"])) {
         $post = json_decode($post["lastPost"], true);
         $export = $post["export"] = true;
     }
     $columns = array(array('db' => 'name', 'dt' => 0), array('db' => 'role', 'dt' => 1), array('db' => 'email', 'dt' => 2), array('db' => 'creation_date', 'dt' => 3, 'formatter' => function ($d, $row) {
         return date('jS M y', strtotime($d));
     }), array('db' => 'id', 'dt' => 4, 'formatter' => function ($d, $row) {
         $op = array();
         if (hasAccess("adminusers", "edit")) {
             $op[] = '<a href="' . site_url('admin/adminusers/edit/' . $d) . '" class="fa fa-edit"></a> ';
         }
         /*if (hasAccess("adminusers","delete"))
         		$op[] = '<a href="javascript:void(0);" onclick="delete_user('.$d.')" class="fa fa-trash-o"></a>';*/
         return implode(" / ", $op);
     }));
     if (!$export) {
         echo json_encode(SSP::simple($post, ADMIN, "id", $columns));
         exit;
     } else {
         $exportColumns = array("name" => "Name", "role" => "Role", "email" => "Email");
         $data = SSP::simple($post, ADMIN, "id", $columns);
         $this->load->library("excel");
         $this->excel->setActiveSheetIndex(0);
         $this->excel->stream('adminusers.xls', $data, $exportColumns);
     }
 }
开发者ID:niravpatel2008,项目名称:ubiquitous-octo-tatertot,代码行数:30,代码来源:adminusers.php

示例3: get_table_exjoin

 function get_table_exjoin($table, $primaryKey, $columns, $join, $where)
 {
     $config = new config();
     $sql_details = $config->sql_details();
     require 'ssp.customized.class.php';
     echo json_encode(SSP::simple($_POST, $sql_details, $table, $primaryKey, $columns, $join, $where));
 }
开发者ID:datadigicore,项目名称:admin_cat,代码行数:7,代码来源:datatable.php

示例4: ajax_list

 public function ajax_list($limit = 0)
 {
     $post = $this->input->post();
     $export = false;
     if (isset($post["isExport"])) {
         $post = json_decode($post["lastPost"], true);
         $export = $post["export"] = true;
     }
     $i = 0;
     $columns = array(array('db' => 'cm_uname', 'dt' => $i++), array('db' => 'cm_uemail', 'dt' => $i++), array('db' => 'cm_umobile', 'dt' => $i++), array('db' => 'cm_ucity', 'dt' => $i++), array('db' => 'cm_ucomment', 'dt' => $i++), array('db' => 'cm_date', 'dt' => $i++, 'formatter' => function ($d, $row) {
         return date('jS M y', strtotime($d));
     }), array('db' => 'cm_id', 'dt' => $i++, 'formatter' => function ($d, $row) {
         $op = array();
         if (hasAccess("contactrequest", "view")) {
             $op[] = '<a href="javascript:void(0);" onclick="view_contact(' . $d . ')" class="fa fa-list-alt"></a>';
         }
         if (hasAccess("contactrequest", "delete")) {
             $op[] = '<a href="javascript:void(0);" onclick="delete_contact(' . $d . ')" class="fa fa-trash-o"></a>';
         }
         return implode(" / ", $op);
     }));
     if (!$export) {
         echo json_encode(SSP::simple($post, CONTACT, "cm_id", $columns));
         exit;
     } else {
         $exportColumns = array("cm_uname" => "Name", "cm_uemail" => "Email", "cm_umobile" => "Mobile number", "cm_ucity" => "City", "cm_ucomment" => "Message", "cm_date" => "Date");
         $data = SSP::simple($post, CONTACT, "cm_id", $columns);
         $this->load->library("excel");
         $this->excel->setActiveSheetIndex(0);
         $this->excel->stream('contact_request.xls', $data, $exportColumns);
     }
 }
开发者ID:niravpatel2008,项目名称:ubiquitous-octo-tatertot,代码行数:32,代码来源:contactrequest.php

示例5: getdata

 public function getdata()
 {
     $table = '`group`';
     $primaryKey = 'id';
     $columns = array(array('db' => 'id', 'dt' => 'DT_RowId', 'formatter' => function ($d, $row) {
         return 'row_' . $d;
     }, 'field' => 'id'), array('db' => 'id', 'dt' => 0, 'field' => 'id'), array('db' => 'name', 'dt' => 1, 'field' => 'name'), array('db' => 'null', 'dt' => 2));
     require 'ssp.ado.class.php';
     echo json_encode(SSP::simple($this->cfg->dbcnx, $_GET, $table, $primaryKey, $columns, $joinQuery));
 }
开发者ID:vlad433,项目名称:universityd,代码行数:10,代码来源:group.php

示例6: get_remote

 public function get_remote()
 {
     $table = 'access_level';
     // Table's primary key
     $primaryKey = 'id';
     // Array of database columns which should be read and sent back to DataTables.
     // The `db` parameter represents the column name in the database, while the `dt`
     // parameter represents the DataTables column identifier. In this case simple
     // indexes
     $columns = array(array('db' => 'level_name', 'dt' => 0), array('db' => 'description', 'dt' => 1), array('db' => 'indicator', 'dt' => 2));
     // SQL server connection information
     $CI =& get_instance();
     $sql_details = array('user' => $CI->db->username, 'pass' => $CI->db->password, 'db' => $CI->db->database, 'host' => $CI->db->hostname);
     echo json_encode(SSP::simple($_GET, $sql_details, $table, $primaryKey, $columns));
 }
开发者ID:jgat2012,项目名称:hp_oms,代码行数:15,代码来源:datagrid.php

示例7: array

        $columns = array(array('db' => 'id', 'dt' => 0), array('db' => 'original_id', 'dt' => 1), array('db' => 'addres', 'dt' => 2), array('db' => 'start_date', 'dt' => 3), array('db' => 'end_date', 'dt' => 4), array('db' => 'task_type_name', 'dt' => 5), array('db' => 'shabloni_name', 'dt' => 6), array('db' => 'first_last_name', 'dt' => 7), array('db' => 'person_name', 'dt' => 8), array('db' => 'prio_name', 'dt' => 9), array('db' => 'note', 'dt' => 10));
        // SQL server connection information
        $sql_details = array('user' => 'root', 'pass' => 'Gl-1114', 'db' => 'asteriskcdrdb', 'host' => 'localhost');
        /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         * If you just want to use the basic configuration for DataTables with PHP
         * server-side, there is no need to edit below this line.
         */
        mysql_close();
        require '../../../../includes/ssp.class.php';
        if ($_REQUEST[check] != '') {
            $dadebit = "";
        } else {
            $dadebit = "";
        }
        $where_param = "";
        $data = SSP::simple($_GET, $sql_details, $table, $primaryKey, $columns, $where_param);
        break;
    case 'delete_file':
        mysql_query("DELETE FROM file WHERE id = {$delete_id}");
        $increm = mysql_query("\tSELECT  `name`,\r\n        \t\t\t`rand_name`,\r\n        \t\t\t`id`\r\n        \t\t\tFROM \t`file`\r\n        \t\t\tWHERE   `task_id` = {$edit_id}\r\n        \t\t\t");
        $data1 = '';
        while ($increm_row = mysql_fetch_assoc($increm)) {
            $data1 .= '<tr style="border-bottom: 1px solid #85b1de;">
				          <td style="width:110px; display:block;word-wrap:break-word;">' . $increm_row[name] . '</td>
        			<td ><button type="button" value="media/uploads/file/' . $increm_row[rand_name] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none;background-image:url(\'media/images/get.png\');" id="download" ></button><input type="text" style="display:none;" id="download_name" value="' . $increm_row[rand_name] . '"> </td>
        					<td ><button type="button" value="' . $increm_row[id] . '" style="cursor:pointer; border:none; margin-top:25%; display:block; height:16px; width:16px; background:none; background-image:url(\'media/images/x.png\');" id="delete"></button></td>
 					  </tr>';
        }
        $data = array('page' => $data1);
        break;
    case 'up_now':
开发者ID:GeoPvN,项目名称:mspy,代码行数:31,代码来源:outgoing_tab8.action.php

示例8: zone_list

 public function zone_list()
 {
     $sql = 'select * from country_zone';
     $sql_data = $this->usermenumodel->columns($sql);
     $ssp_file = 'IncludeViews/ssp.php';
     require $ssp_file;
     echo json_encode(SSP::simple($_POST, $sql_data['sql_details'], $sql, $sql_data['columns']));
 }
开发者ID:aakash5792,项目名称:sample,代码行数:8,代码来源:zone.php

示例9: usermaster_list

 public function usermaster_list()
 {
     $sql = $this->usermastermodel->index();
     $sql_data = $this->usermenumodel->columns($sql);
     $ssp_file = 'IncludeViews/ssp.php';
     require $ssp_file;
     echo json_encode(SSP::simple($_POST, $sql_data['sql_details'], $sql, $sql_data['columns']));
 }
开发者ID:aakash5792,项目名称:sample,代码行数:8,代码来源:usermaster.php

示例10: menucat_list

 public function menucat_list()
 {
     $sql = 'select menu_category_id,menu_category_name from menu_category';
     $sql_data = $this->usermenumodel->columns($sql);
     $ssp_file = 'IncludeViews/ssp.php';
     require $ssp_file;
     echo json_encode(SSP::simple($_POST, $sql_data['sql_details'], $sql, $sql_data['columns']));
 }
开发者ID:aakash5792,项目名称:sample,代码行数:8,代码来源:menucat-1.php

示例11: get_table

 function get_table($tabel, $kunci, $kolom)
 {
     $table = $tabel;
     $primaryKey = $kunci;
     $columns = $kolom;
     $sql_details = array('user' => $this->ci->db->username, 'pass' => $this->ci->db->password, 'db' => $this->ci->db->database, 'host' => $this->ci->db->hostname);
     require 'ssp.class.php';
     echo json_encode(SSP::simple($_POST, $sql_details, $table, $primaryKey, $columns));
 }
开发者ID:datadigicore,项目名称:pdln,代码行数:9,代码来源:L_datatable.php

示例12: ajax

 function ajax()
 {
     $table = 'v_asignaturas';
     $primaryKey = 'codigo';
     $columns = array(array('db' => 'nombre_area_administrativa', 'dt' => 0), array('db' => 'codigo', 'dt' => 1), array('db' => 'nombre', 'dt' => 2), array('db' => 'codigo', 'dt' => 3, 'formatter' => function ($d, $row) {
         return '<input type="checkbox" name="asignatura_ciclo" value="' . $d . '" onclick="$.ajax({method: \'POST\', url: \'/asignaturas_ciclo/asociar_asignatura_ciclo\', data: { asignatura: \'' . $d . '\'}})">';
     }));
     $sql_details = array('user' => 'root', 'pass' => 'root', 'db' => 'simapro', 'host' => 'localhost');
     require 'ssp.class.php';
     echo json_encode(SSP::simple($_GET, $sql_details, $table, $primaryKey, $columns));
 }
开发者ID:juan-gamez,项目名称:simapro,代码行数:11,代码来源:Asignaturas_ciclo.php

示例13: ajax_list

 public function ajax_list($limit = 0)
 {
     $post = $this->input->post();
     $columns = array(array('db' => 'name', 'dt' => 0), array('db' => 'email', 'dt' => 1), array('db' => 'creation_date', 'dt' => 2, 'formatter' => function ($d, $row) {
         return date('jS M y', strtotime($d));
     }), array('db' => 'id', 'dt' => 3, 'formatter' => function ($d, $row) {
         $op = array();
         $op[] = '<a href="' . site_url('/users/edit/' . $d) . '" class="fa fa-edit"></a> ';
         $op[] = '<a href="javascript:void(0);" onclick="delete_user(' . $d . ')" class="fa fa-trash-o"></a>';
         return implode(" / ", $op);
     }));
     echo json_encode(SSP::simple($post, USER, "id", $columns));
     exit;
 }
开发者ID:niravpatel2008,项目名称:yummy-wookie,代码行数:14,代码来源:users.php

示例14: getOrder

 public function getOrder()
 {
     $table = 'tx_order';
     $primaryKey = 'id';
     $columns = array(array('db' => '`o`.`id`', 'dt' => 'id', 'formatter' => function ($d, $row) {
         return 'row_' . $d;
     }, 'field' => 'id'), array('db' => '`o`.`show_id`', 'dt' => 'show_id', 'field' => 'show_id'), array('db' => '`o`.`order_time`', 'dt' => 'order_time', 'field' => 'order_time'), array('db' => '`o`.`order_mobile`', 'dt' => 'mobile1', 'field' => 'order_mobile'), array('db' => '`o`.`cared_name`', 'dt' => 'cared_name', 'field' => 'cared_name'), array('db' => '`o`.`cared_gender`', 'dt' => 'cared_gender', 'field' => 'cared_gender'), array('db' => '`h`.`hospital_name`', 'dt' => 'hospital_name', 'field' => 'hospital_name'), array('db' => '`u`.`mobile`', 'dt' => 'mobile2', 'field' => 'mobile'), array('db' => '`o`.`status`', 'dt' => 'status', 'field' => 'status'), array('db' => '`o`.`cid`', 'dt' => 'cid', 'field' => 'cid'));
     $sql_details = array('user' => 'root', 'pass' => 'root', 'db' => 'taixin', 'host' => 'localhost');
     require 'ssp.customized.class.php';
     $joinQuery = "FROM `tx_order` AS `o` JOIN `tx_user` AS `u` ON (`u`.`id` = `o`.`uid`) JOIN  `tx_hospital` AS `h` ON (`h`.`id` = `o`.`hospital_id`)";
     //$extraWhere = "`u`.`salary` >= 90000";
     $extraWhere = '';
     echo json_encode(SSP::simple($_GET, $sql_details, $table, $primaryKey, $columns, $joinQuery, $extraWhere));
 }
开发者ID:wjyGamedev,项目名称:xuezhiweb,代码行数:14,代码来源:db.php

示例15: ajax_list

 public function ajax_list($limit = 0)
 {
     $post = $this->input->post();
     $export = false;
     if (isset($post["isExport"])) {
         $post = json_decode($post["lastPost"], true);
         $export = $post["export"] = true;
     }
     $columns = array(array('db' => 'ad.ad_title', 'dt' => 0), array('db' => 'ad.ad_image', 'dt' => 1), array('db' => 'ad.ad_link', 'dt' => 2), array('db' => 'ad.ad_ispaid', 'dt' => 3), array('db' => 'ad.ad_show_on_page', 'dt' => 4), array('db' => 'ad.ad_created_date', 'dt' => 5, 'formatter' => function ($d, $row) {
         return date('jS M y', strtotime($d));
     }), array('db' => 'ad.ad_active', 'dt' => 6, 'formatter' => function ($d, $row) {
         $status = '';
         if ($d == 1) {
             $status = 'Active';
         }
         if ($d == 0) {
             $status = 'Inactive';
         }
         return $status;
     }), array('db' => 'ad.ad_id', 'dt' => 7, 'formatter' => function ($d, $row) {
         $op = array();
         if (hasAccess("advertise", "view")) {
             $op[] = '<a href="javascript:void(0);" onclick="view_ad(' . $d . ')" class="fa fa-list-alt"></a>';
         }
         if (hasAccess("advertise", "edit")) {
             $op[] = '<a href="' . site_url('/admin/advertise/edit/' . $d) . '" class="fa fa-edit"></a>';
         }
         if (hasAccess("advertise", "delete")) {
             $op[] = '<a href="javascript:void(0);" onclick="delete_ad(' . $d . ')" class="fa fa-trash-o">';
         }
         return implode(" / ", $op);
     }));
     #$join[] = array(USER_U,"u.u_id = ad.ad_uid");
     if (!$export) {
         echo json_encode(SSP::simple($post, ADVERTISE_AD, "ad.ad_id", $columns));
         exit;
     } else {
         $exportColumns = array("ad_title" => "Title", "ad_link" => "Link", "ad_ispaid" => "Is Paid", "ad_show_on_page" => "On Page", "ad_active" => "Status", "ad_created_date" => "Created At");
         $data = SSP::simple($post, ADVERTISE_AD, "ad.ad_id", $columns);
         $this->load->library("excel");
         $this->excel->setActiveSheetIndex(0);
         $this->excel->stream('advertise.xls', $data, $exportColumns);
     }
 }
开发者ID:niravpatel2008,项目名称:ubiquitous-octo-tatertot,代码行数:44,代码来源:advertise.php


注:本文中的SSP::simple方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。