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


PHP Bin_Query::updateQuery方法代码示例

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


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

示例1: updatesiteSettings

  /**
   * Function updates the changes made in the site moto details into the table 
   * 
   * 
   * @return string
   */
  function updatesiteSettings()
  {
      $remove = array("\\n", "\\r");
      $_POST['google_analytics'] = str_replace($remove, "", $_POST['google_analytics']);
      $_POST['customer_header'] = str_replace($remove, "", $_POST['customer_header']);
      if ($_FILES['site_logo']['name'] != '') {
          $site_logo_path = 'images/logo/' . date("YmdHis") . '_' . $_FILES['site_logo']['name'];
          if (move_uploaded_file($_FILES['site_logo']['tmp_name'], '../' . $site_logo_path)) {
              $site_logo = $site_logo_path;
          }
      } else {
          $site_logo = $_POST['site_logo'];
      }
      $sql = "UPDATE admin_settings_table SET \n\t\t\tcustomer_header ='" . trim($_POST['customer_header']) . "' ,\n\t\t\tsite_logo='" . $site_logo . "',\n\t\t\tgoogle_analytics='" . trim($_POST['google_analytics']) . "',\n\t\t\ttime_zone='" . trim($_POST['time_zone']) . "',\n\t\t\tsite_moto='" . trim($_POST['site_moto']) . "',\t\t\t\n\t\t\tmeta_kerwords='" . stripslashes(trim($_POST['meta_kerwords'])) . "',\n\t\t\tmeta_description='" . stripslashes(trim($_POST['meta_description'])) . "'\n\t\t\twhere set_id='1'";
      $query = new Bin_Query();
      if ($query->updateQuery($sql)) {
          $_SESSION['msgSitemoto'] = '<div class="alert alert-success">
 				 <button type="button" class="close" data-dismiss="alert">×</button> Site settings has been updated successfully </div>';
      } else {
          $_SESSION['msgSitemoto'] = '<div class="alert alert-error">
  				<button type="button" class="close" data-dismiss="alert">×</button>Site settings has not been updated successfully</div>';
      }
      header('Location:?do=site');
      exit;
  }
开发者ID:kingsj,项目名称:zeuscart,代码行数:31,代码来源:CSiteSettings.php

示例2: updateContactUs

 /**
  * Function updates the contact us details into the table 
  * 
  * 
  * @return string
  */
 function updateContactUs()
 {
     $sql = "UPDATE contactus_table SET contactus='" . $_POST['contactus'] . "' Where id=1";
     $query = new Bin_Query();
     if ($query->updateQuery($sql)) {
         return '<div class="success_msgbox">Contact Us Information Updated Successfully</div>';
     } else {
         return '<div class="error_msgbox">Content Not Updated </div>';
     }
 }
开发者ID:kingsj,项目名称:zeuscart,代码行数:16,代码来源:CContactUs.php

示例3: updateOrderStatus

 /**
  * Function updates the order status into the database
  * 
  * 
  * @return string
  */
 function updateOrderStatus()
 {
     $name = $_POST['orderstatus'];
     $id = $_POST['id'];
     $sql = "update orders_status_table set orders_status_name='" . $name . "' where orders_status_id=" . $id;
     $obj = new Bin_Query();
     $obj->updateQuery($sql);
     $fin = 'One Record is Updated Successfully';
     return $fin;
 }
开发者ID:kingsj,项目名称:zeuscart,代码行数:16,代码来源:COrderStatusManagement.php

示例4: updateCopyrights

 /**
  * Function updates the copyrights details into the table 
  * 
  * 
  * @return string
  */
 function updateCopyrights()
 {
     $sql = "UPDATE admin_settings_table SET set_value='" . $_POST['copyrights'] . "' Where set_name='Copy Rights'";
     $query = new Bin_Query();
     if ($query->updateQuery($sql)) {
         return '<div class="success_msgbox">Copy right Information Updated Successfully</div>';
     } else {
         return '<div class="error_msgbox">Copyright  Not Updated </div>';
     }
 }
开发者ID:kingsj,项目名称:zeuscart,代码行数:16,代码来源:CCopyrights.php

示例5: updateTimeZone

 /**
  * Function updates the changes made in the time zone details into the database 
  * 
  * 
  * @return string
  */
 function updateTimeZone()
 {
     if ($_POST['timezone'] != '') {
         $sql = "UPDATE admin_settings_table SET set_value='" . $_POST['timezone'] . "' where set_name='Time Zone'";
         $query = new Bin_Query();
         if ($query->updateQuery($sql)) {
             return '<div class="alert alert-success">
 <button type="button" class="close" data-dismiss="alert">×</button> <strong> well done !</strong> Timezone Updated to <b>' . $_POST['timezone'] . '</b> Successfully</div>';
         }
     }
 }
开发者ID:kingsj,项目名称:zeuscart,代码行数:17,代码来源:CTimeZone.php

示例6: updateCustomHeader

 /**
  * Function updates the custom header details into the table
  * 
  * 
  * @return string
  */
 function updateCustomHeader()
 {
     $sql = "update admin_settings_table set set_value='" . trim($_POST['headerContent']) . "' where set_name='Custom Header'";
     $obj = new Bin_Query();
     if ($obj->updateQuery($sql)) {
         return '<div class="alert alert-success">
 <button type="button" class="close" data-dismiss="alert">×</button> <strong> well done !</strong> Custom Header changed Successfully</div>';
     } else {
         return '<div class="alert alert-error">
 <button type="button" class="close" data-dismiss="alert">×</button> Unable to change Custom Header</div>';
     }
 }
开发者ID:kingsj,项目名称:zeuscart,代码行数:18,代码来源:CCustomHeader.php

示例7: addContent

 /**
  * Function adds an HTML Content value into the database
  * 
  * 
  * @return string
  */
 function addContent()
 {
     if (trim($_POST['contentname']) != '' && trim($_POST['htmlcontent']) != '') {
         $content = $_POST['contentname'];
         $sql = "INSERT INTO html_contents_table (html_content_name,html_content) VALUES ('" . $content . "','" . $_POST['htmlcontent'] . "')";
         $query = new Bin_Query();
         if ($query->updateQuery($sql)) {
             return '<div class="success_msgbox">Content Added Successfully</div>';
         }
     } else {
         return '<div class="error_msgbox">Field Can not be Blank</div>';
     }
 }
开发者ID:kingsj,项目名称:zeuscart,代码行数:19,代码来源:CContentManagement.php

示例8: updatePrivacyPolicy

    /**
     * Function updates the privacy policy content into the database
     * 
     * 
     * @return string
     */
    function updatePrivacyPolicy()
    {
        $sql = "UPDATE privacypolicy_table SET privacypolicy='" . $_POST['privacypolicy'] . "' Where id=1";
        $query = new Bin_Query();
        if ($query->updateQuery($sql)) {
            return '<div class="alert alert-success">
			<button type="button" class="close" data-dismiss="alert">×</button>
			<strong>Well done!</strong> Privacy Policy Updated Successfully</div>';
        } else {
            return '<div class="alert alert-error">
			<button type="button" class="close" data-dismiss="alert">×</button> Privacy Policy Not Updated </div>';
        }
    }
开发者ID:kingsj,项目名称:zeuscart,代码行数:19,代码来源:CPrivacyPolicy.php

示例9: updateAboutUs

    /**
     * Function updates the about us value into the database
     * 
     * 
     * @return string 
     */
    function updateAboutUs()
    {
        $sql = "update aboutus_table set content='" . trim($_POST['aboutus']) . "' where id=1";
        $obj = new Bin_Query();
        if ($obj->updateQuery($sql)) {
            return '<div class="alert alert-success">
		<button type="button" class="close" data-dismiss="alert">×</button>
		<strong>Well done!</strong> AboutUs Content changed Successfully</div>';
        } else {
            return '<div class="alert alert-error">
		<button type="button" class="close" data-dismiss="alert">×</button> Unable to change AboutUs Content</div>';
        }
    }
开发者ID:kingsj,项目名称:zeuscart,代码行数:19,代码来源:CAboutUs.php

示例10: updateTerms

    /**
     * Function updates the terms and conditions content to the database 
     * 
     * 
     * @return string
     */
    function updateTerms()
    {
        $sql = "UPDATE termsconditions_table SET termscontent='" . $_POST['termscontent'] . "' Where termsid=1";
        $query = new Bin_Query();
        if ($query->updateQuery($sql)) {
            return '<div class="alert alert-success">
			<button type="button" class="close" data-dismiss="alert">×</button>
			<strong>Well done!</strong> Content Updated Successfully</div>';
        } else {
            return '<div class="alert alert-error">
			<button type="button" class="close" data-dismiss="alert">×</button> Content Not Updated </div>';
        }
    }
开发者ID:kingsj,项目名称:zeuscart,代码行数:19,代码来源:CTermsCondition.php

示例11: addLink

 /**
  * Function adds a new header link into the database
  * 
  * 
  * @return string
  */
 function addLink()
 {
     $sql = "SELECT * FROM header_link_table WHERE link_name ='" . $_POST['linkname'] . "'";
     $query = new Bin_Query();
     if ($query->executeQuery($sql)) {
         echo "Already this link is Added";
     } else {
         $sql = "INSERT INTO header_link_table (link_name,link_url) VALUES ('" . $_POST['linkname'] . "','" . $_POST['linkurl'] . "')";
         $query = new Bin_Query();
         if ($query->updateQuery($sql)) {
             echo "Added Successfully";
         }
     }
 }
开发者ID:kingsj,项目名称:zeuscart,代码行数:20,代码来源:CHeaderSettings.php

示例12: updateDomainName

 /**
  * Function updates the changes made in the domain name
  * 
  * 
  * @return string
  */
 function updateDomainName()
 {
     if ($_POST['name'] != '') {
         $sql = "UPDATE admin_settings_table SET set_value='" . $_POST['name'] . "' where set_name='Domain Name'";
         $query = new Bin_Query();
         if ($query->updateQuery($sql)) {
             return '<div class="success_msgbox" style="width:646px;">Domain Name <b>' . $_POST['name'] . '</b> Saved Successfully</div>';
         } else {
             return '<div class="error_msgbox" style="width:646px;">Domain Name Not Found</div>';
         }
     } else {
         return '<div class="error_msgbox" style="width:646px;">Domain Name Should Not Be Empty</div>';
     }
 }
开发者ID:kingsj,项目名称:zeuscart,代码行数:20,代码来源:CDomainName.php

示例13: updateGoogleAddWordsCode

 /**
  * Function updates the changes in the Google Adword code into the database
  * 
  * 
  * @return string
  */
 function updateGoogleAddWordsCode()
 {
     if ($_POST['gaddwords'] != '') {
         $gad = "<div id=\"ad\">" . $_POST['gaddwords'] . "</div>";
         $sql = "UPDATE admin_settings_table SET set_value='" . stripslashes(mysql_real_escape_string($gad)) . "' \n\t\t\twhere set_name='Google AdWords code'";
         $query = new Bin_Query();
         if ($query->updateQuery($sql)) {
             return '<div class="success_msgbox">Updated Successfully</div>';
         } else {
             return '<div class="error_msgbox">Sorry Not Updated </div>';
         }
     } else {
         return '<div class="error_msgbox">Please Insert a Google adword Script Code</div>';
     }
 }
开发者ID:kingsj,项目名称:zeuscart,代码行数:21,代码来源:CGoogleAdWords.php

示例14: insertSkin

    /**
     * Function adds a new skin into the database 
     * 
     * 
     * @return string
     */
    function insertSkin()
    {
        $sql = "INSERT INTO skins_table (skin_name,skin_status) VALUES ('" . $_POST['skinname'] . "',0)";
        $query = new Bin_Query();
        if ($query->updateQuery($sql)) {
            unset($_SESSION['skinname']);
            return '<div class="alert alert-success">
			<button data-dismiss="alert" class="close" type="button">×</button> Updated Successfully</div>';
            //$_SESSION['msg']= "Added Successfully";
        } else {
            unset($_SESSION['skinname']);
            return '<div class="alert alert-error">
			<button data-dismiss="alert" class="close" type="button">×</button>  Problem while insert</div>';
            //$_SESSION['msg']= "Problem while insert";
        }
    }
开发者ID:kingsj,项目名称:zeuscart,代码行数:22,代码来源:CSkin.php

示例15: updateProducts

 /**
  * Function updates the changes made in the featured products 
  * 
  * 
  * @return string
  */
 function updateProducts()
 {
     for ($i = 0; $i < count($_POST['productid']); $i++) {
         if (!in_array($_POST['productid'][$i], $_POST['checkbox'])) {
             $arr[] = $_POST['productid'][$i];
         }
     }
     if (isset($_POST['checkbox'])) {
         foreach ($arr as $val) {
             $sql = "UPDATE products_table SET is_featured='0' WHERE product_id='" . $val . "'";
             $query = new Bin_Query();
             $query->updateQuery($sql);
         }
         return '<div class="success_msgbox">Featured Products Updated Successfully</div>';
     }
 }
开发者ID:kingsj,项目名称:zeuscart,代码行数:22,代码来源:CViewFeaturedItems.php


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