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


PHP id_clean函数代码示例

本文整理汇总了PHP中id_clean函数的典型用法代码示例。如果您正苦于以下问题:PHP id_clean函数的具体用法?PHP id_clean怎么用?PHP id_clean使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: getMessageByID

	function getMessageByID($id = 0)
	{
   		$this->db->where('message_id',id_clean($id));
		$Q = $this->db->get('is_contact_us');
		if ($Q->num_rows() > 0){
	      	$data = $Q->row_array();
	    }
	    $Q->free_result();    
	    return $data;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:10,代码来源:mcontact.php

示例2: updateEmployee

 function updateEmployee()
 {
     $birthday = isset($_POST['birthday']) ? $_POST['birthday'] : '0-0-0';
     $array_birth = explode('-', $birthday);
     $enterday = isset($_POST['enterday']) ? $_POST['enterday'] : '0-0-0';
     $array_enter = explode('-', $enterday);
     $data = array('name' => db_clean($_POST['name']), 'dept_id' => id_clean($_POST['dept_id']), 'position' => db_clean($_POST['position']), 'mobile' => db_clean($_POST['mobile']), 'telephone' => db_clean($_POST['telephone']), 'address' => db_clean($_POST['address']), 'zipcode' => db_clean($_POST['zipcode']), 'birth_year' => id_clean($array_birth[0]), 'birth_month' => id_clean($array_birth[1]), 'birth_day' => id_clean($array_birth[2]), 'enter_year' => id_clean($array_enter[0]), 'enter_month' => id_clean($array_enter[1]), 'enter_day' => id_clean($array_enter[2]), 'idcard' => db_clean($_POST['idcard']), 'graduateschool' => db_clean($_POST['graduateschool']), 'education' => db_clean($_POST['education']));
     $this->db->where('id', $_POST['id']);
     $this->db->update('yz_employees', $data);
 }
开发者ID:BGCX261,项目名称:zhiyin-svn-to-git,代码行数:10,代码来源:m_employees.php

示例3: updateSubscriber

    function updateSubscriber()
    {
    	$data = array( 
    		'name' => db_clean($_POST['name']),
    		'email' => db_clean($_POST['email'])
    	);
     	$this->db->where('id', id_clean($_POST['id']));
    	$this->db->update('omc_subscribers', $data);	

    }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:10,代码来源:msubscribers.php

示例4: getMessage

 function getMessage($id)
 {
     $data = array();
     $options = array('id' => id_clean($id));
     $Q = $this->db->getwhere('shoutbox', $options, 1);
     if ($Q->num_rows() > 0) {
         $data = $Q->row_array();
     }
     $Q->free_result();
     return $data;
 }
开发者ID:nithindavid,项目名称:Kaimonokago,代码行数:11,代码来源:mmessages.php

示例5: checkOrphans

 function checkOrphans($id)
 {
     $data = array();
     $this->db->where('customer_id', id_clean($id));
     $Q = $this->db->get('omc_order');
     if ($Q->num_rows() > 0) {
         foreach ($Q->result_array() as $key => $row) {
             $data[$key] = $row;
         }
         $Q->free_result();
         return $data;
     }
 }
开发者ID:nithindavid,项目名称:Kaimonokago,代码行数:13,代码来源:mcustomers.php

示例6: _fields

 function _fields()
 {
     $data = array(
         'name'          =>  db_clean($_POST['name']),
         'shortdesc'     =>  db_clean($_POST['shortdesc']),
         'status'        =>  db_clean($_POST['status'],8),
         'parentid'      =>  id_clean($_POST['parentid']),
         'order'         =>  id_clean($_POST['order'],10),
         'page_uri_id'   =>  db_clean($_POST['page_uri_id']),
         'lang_id'       =>  db_clean($_POST['lang_id']),
         'menu_id'       =>  db_clean($_POST['menu_id'])
     );
     // $this->MKaimonokago->addItem($this->module, $data);
     return $data;
 }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:15,代码来源:admin.php

示例7: checkOrphans

	function checkOrphans($id)
    {
        $data = array();
        $this->db->where('kho_id',id_clean($id));
        $Q = $this->db->get('shop_kho');
        if ($Q->num_rows() > 0)
        {
            foreach ($Q->result_array() as $row)
            {
                $data[] = $row;
            }
        $Q->free_result();
        return $data;
        }
    }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:15,代码来源:mkho.php

示例8: _fields

 function _fields()
 {
     $data = array(
     'name'        => db_clean($_POST['name']),
     'metadesc'    => db_clean($_POST['metadesc']),
     'metakeyword' => db_clean($_POST['metakeyword']),
     'shortdesc'   => db_clean($_POST['shortdesc']),
     'longdesc'    => $this->input->post('longdesc'),
     'status'      => db_clean($_POST['status'],8),
     'parentid'    => id_clean($_POST['parentid']),
     'lang_id'     => id_clean($_POST['lang_id']),
     'order'       => id_clean($_POST['order'],10),
     'table_id'    => id_clean($_POST['table_id'])
     );
     // $this->MKaimonokago->addItem($this->module, $data);
     return $data;
 }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:17,代码来源:admin.php

示例9: updateUser

 function updateUser()
 {
     $data = array('username' => db_clean($_POST['username']), 'password' => md5($_POST['password']), 'email' => db_clean($_POST['email']), 'group' => id_clean($_POST['group']), 'status' => id_clean($_POST['status']));
     $this->db->where('uid', $_POST['uid']);
     $this->db->update('yz_users', $data);
     /* 		$this->db->where('roleid', $_POST['roleid']);
     		$this->db->delete('yz_role_action');
     			
     		$actions= $_POST['actionItems'];
     		$array_actions=explode(',',$actions);
     		if (count($array_actions)){
     			foreach ($array_actions  as $value){
     				$data = array('roleid' => $_POST['roleid'],
     						'actionid' => intval($value));
     				$this->db->insert('yz_role_action',$data);
     			}
     		} */
 }
开发者ID:BGCX261,项目名称:zhiyin-svn-to-git,代码行数:18,代码来源:m_users.php

示例10: getOrder

	function getOrder($id)
    {
        $data = array();
		$data = array();
		
    	//$this->db->order_by('table_id','asc');
        $Q = $this->db->query('SELECT statusSrc.value as statusSrcStr, statusDst.value as statusDstStr, is_order.* FROM is_order 
								LEFT JOIN is_order_status as statusSrc on is_order.status_src = statusSrc.id 
								LEFT JOIN is_order_status as statusDst  on is_order.status_dst = statusDst.id
								WHERE is_order.order_id = '.id_clean($id));
        if ($Q->num_rows() > 0)
        {
            foreach ($Q->result_array() as $row)
            {
                $data[] = $row;
            }
        }
        $Q->free_result();
        
        if(count($data) > 0)
        	return $data[0];
        else 
        	return null;	
    }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:24,代码来源:morders.php

示例11: updateItem

/**
 * usded in customer/controllers/, slideshow/controllers/, menus, products, pages, playroom category,
 * @param <type> $module
 * @param <type> $data
 */


    function updateItem($module,$data)
    {
        $module_table = 'omc_'.$module;
        if($module =='customer')
        {// omc_cutomer has customer_id
            $idname = 'customer_id';
            $this->db->where($idname, id_clean($_POST['customer_id']));
        }
        else
        {
            $idname = 'id';
            $this->db->where($idname, id_clean($_POST['id']));
        }
	   $this->db->update($module_table, $data);
    }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:22,代码来源:mkaimonokago.php

示例12: deleteUser

		function deleteUser($id)
		{
 	 		$data = array('status' => 'inactive');
 	 		$this->db->where('id', id_clean($id));
	 		$this->db->update('admins', $data);
		}
开发者ID:sspat,项目名称:citest,代码行数:6,代码来源:madmins.php

示例13: changeCatStatus

 function changeCatStatus($id)
 {
     // getting status of page
     $catinfo = array();
     $catinfo = $this->getCategory($id);
     $status = $catinfo['status'];
     if($status =='active')
     {
     	$data = array('status' => 'inactive');
     	$this->db->where('id', id_clean($id));
     	$this->db->update('omc_category', $data);	
     }
     else
     {
     	$data = array('status' => 'active');
     	$this->db->where('id', id_clean($id));
     	$this->db->update('omc_category', $data);	
     }
 }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:19,代码来源:mcats.php

示例14: verifyCart

		function verifyCart()
		{
			$cart = $_SESSION['cart'];
			$change = false;
			$idlist = array();
			$final = array();
			
			if (count($cart))
			{
				foreach ($cart as $id => $details)
				{
					$idlist[] = id_clean($id);
				}
				$ids = implode(",", $idlist);
				$this->db->select('id, price');
				$this->db->where("id in ($ids)");
				$Q = $this->db->get('products');
				if ($Q->num_rows() > 0)
				{
					foreach ($Q->result_array() as $row)
					{
						$db[$row['id']] = $row['price'];
					}
				}
				foreach ($cart as $id => $details)
				{
					if (isset($db[$id]))
					{
						if ($details['price'] != $db[$id])
						{
							$details['price'] = $db[$id];
							$change = true;
						}
						$final[$id] = $details;
					}
					else
					{
						$change = true;
					}
				}
				
				$totalprice = 0;
				foreach ($final as $id => $product)
				{
					$totalprice += $product['price'] * $product['count'];
				}
				
				$_SESSION['totalprice'] = $this->format_currency($totalprice);
				$_SESSION['cart'] = $final;
				$this->session->set_flashdata('change', $change);
			}
			else
			{
				//nothing in cart!
				$this->session->set_flashdata('error', "Nothing in cart! Please notify help@example.com to report this problem during checkout.");
			}
		}
开发者ID:sspat,项目名称:citest,代码行数:57,代码来源:morders.php

示例15: checkOrphans

		function checkOrphans($id)
		{
			$data = array();
			$this->db->select('id, name');
			$this->db->where('category_id', id_clean($id));
			$Q = $this->db->get('products');
			if ($Q->num_rows() > 0)
			{
				foreach ($Q->result_array() as $row)
				{
					$data[$row['id']] = $row['name'];
				}
			}
			
			$Q->free_result();  
    		return $data; 
		}
开发者ID:sspat,项目名称:citest,代码行数:17,代码来源:mcats.php


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