Beispiel #1
0
 public function update($advertisingid, $advertisingname, $partnerid, $startdate, $enddate, $adtypeid, $catID, $content, $imagelink, $preferlink, $order, $createdby, $createddate, $modifiedby, $modifieddate, $deletedby, $deleteddate, $isdeleted, $status)
 {
     $strTableName = self::TBL_SL_ADVERTISING;
     $strSQL = global_common::prepareQuery(self::SQL_UPDATE_SL_ADVERTISING, array($strTableName, global_common::escape_mysql_string($advertisingid), global_common::escape_mysql_string($advertisingname), global_common::escape_mysql_string($partnerid), global_common::formatDateTimeSQL($startdate), global_common::formatDateTimeSQL($enddate), global_common::escape_mysql_string($adtypeid), global_common::escape_mysql_string($content), global_common::escape_mysql_string($imagelink), global_common::escape_mysql_string($preferlink), global_common::escape_mysql_string($order), global_common::escape_mysql_string($createdby), global_common::escape_mysql_string($createddate), global_common::escape_mysql_string($modifiedby), global_common::escape_mysql_string($modifieddate), global_common::escape_mysql_string($deletedby), global_common::escape_mysql_string($deleteddate), global_common::escape_mysql_string($isdeleted), global_common::escape_mysql_string($status), $catID));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_ADVERTISING, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_advertising:' . $strSQL, 1);
         return false;
     }
     return $advertisingid;
 }
 public function update($userid, $username, $password, $fullname, $birthdate, $address, $phone, $email, $sex, $identity, $roleid, $userrankid, $avatar, $accountid, $isactived)
 {
     $strTableName = self::TBL_SL_USER;
     $strSQL = global_common::prepareQuery(self::SQL_UPDATE_SL_USER, array($strTableName, global_common::escape_mysql_string($userid), global_common::escape_mysql_string($username), global_common::escape_mysql_string($password), global_common::escape_mysql_string($fullname), global_common::formatDateTimeSQL($birthdate), global_common::escape_mysql_string($address), global_common::escape_mysql_string($phone), global_common::escape_mysql_string($email), global_common::escape_mysql_string($sex), global_common::escape_mysql_string($identity), global_common::escape_mysql_string($roleid), global_common::escape_mysql_string($userrankid), global_common::escape_mysql_string($avatar), global_common::escape_mysql_string($accountid), global_common::escape_mysql_string($isactived)));
     //echo $strSQL;
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_USER, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_user:' . $strSQL, 1);
         return false;
     }
     return true;
 }
Beispiel #3
0
 public function update($articleid, $prefix, $title, $filename, $articletype, $content, $notificationtype, $tags, $numview, $numcomment, $createdby, $createddate, $modifiedby, $modifieddate, $deletedby, $deleteddate, $isdeleted, $status, $comments, $reneweddate, $renewednum, $companyname, $companyAddress, $companyWebsite, $companyPhone, $adType, $startDate, $endDate, $happyDays, $startHappyHour, $endHappyHour, $addresses, $dictricts, $cities)
 {
     $strTableName = self::TBL_SL_ARTICLE;
     $strSQL = global_common::prepareQuery(self::SQL_UPDATE_SL_ARTICLE, array($strTableName, global_common::escape_mysql_string($articleid), global_common::escape_mysql_string($prefix), global_common::escape_mysql_string($title), global_common::escape_mysql_string($filename), global_common::escape_mysql_string($content), global_common::escape_mysql_string($notificationtype), global_common::escape_mysql_string($tags), global_common::escape_mysql_string($numview), global_common::escape_mysql_string($numcomment), global_common::escape_mysql_string($createdby), global_common::escape_mysql_string($createddate), global_common::escape_mysql_string($modifiedby), global_common::escape_mysql_string($modifieddate), global_common::escape_mysql_string($deletedby), global_common::escape_mysql_string($deleteddate), global_common::escape_mysql_string($isdeleted), global_common::escape_mysql_string($status), global_common::escape_mysql_string($comments), global_common::escape_mysql_string($reneweddate), global_common::escape_mysql_string($renewednum), global_common::escape_mysql_string($companyname), global_common::escape_mysql_string($companyAddress), global_common::escape_mysql_string($companyWebsite), global_common::escape_mysql_string($companyPhone), global_common::escape_mysql_string($adType), global_common::formatDateTimeSQL($startDate), global_common::formatDateTimeSQL($endDate), global_common::escape_mysql_string($happyDays), $startHappyHour ? '\'' . $startHappyHour . '\'' : 'null', $endHappyHour ? '\'' . $endHappyHour . '\'' : 'null', global_common::escape_mysql_string($addresses), global_common::escape_mysql_string($dictricts), global_common::escape_mysql_string($cities)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_ARTICLE, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_article:' . $strSQL, 1);
         return false;
     }
     return $articleid;
 }
 public function update($articleid, $prefix, $title, $filename, $articletype, $content, $notificationtype, $tags, $numview, $numcomment, $createdby, $createddate, $modifiedby, $modifieddate, $deletedby, $deleteddate, $isdeleted, $status, $comments, $reneweddate, $renewednum, $companyname, $companyAddress, $companyWebsite, $companyPhone, $adType, $startDate, $endDate, $happyDays, $startHappyHour, $endHappyHour, $addresses, $dictricts, $cities)
 {
     $strTableName = self::TBL_SL_ARTICLE;
     $strSQL = global_common::prepareQuery(self::SQL_UPDATE_SL_ARTICLE, array($strTableName, global_common::escape_mysql_string($articleid), global_common::escape_mysql_string($prefix), global_common::escape_mysql_string($title), global_common::escape_mysql_string($filename), global_common::escape_mysql_string($content), global_common::escape_mysql_string($notificationtype), global_common::escape_mysql_string($tags), global_common::escape_mysql_string($numview), global_common::escape_mysql_string($numcomment), global_common::escape_mysql_string($createdby), global_common::escape_mysql_string($createddate), global_common::escape_mysql_string($modifiedby), global_common::escape_mysql_string($modifieddate), global_common::escape_mysql_string($deletedby), global_common::escape_mysql_string($deleteddate), global_common::escape_mysql_string($isdeleted), global_common::escape_mysql_string($status), global_common::escape_mysql_string($comments), global_common::escape_mysql_string($reneweddate), global_common::escape_mysql_string($renewednum), global_common::escape_mysql_string($companyname), global_common::escape_mysql_string($companyAddress), global_common::escape_mysql_string($companyWebsite), global_common::escape_mysql_string($companyPhone), global_common::escape_mysql_string($adType), '\'' . global_common::formatDateTimeSQL($startDate) . '\'', global_common::formatDateTimeSQL($endDate) ? '\'' . global_common::formatDateTimeSQL($endDate) . '\'' : 'null', global_common::escape_mysql_string($happyDays), $startHappyHour ? '\'' . $startHappyHour . '\'' : 'null', $endHappyHour ? '\'' . $endHappyHour . '\'' : 'null', global_common::escape_mysql_string($addresses), global_common::escape_mysql_string($dictricts), global_common::escape_mysql_string($cities)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_ARTICLE, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_article:' . $strSQL, 1);
         return false;
     }
     $strSQL = global_common::prepareQuery(global_common::SQL_DELETE_BY_CONDITION, array(self::TBL_SL_ARTICLE_TYPE_ID, global_mapping::ArticleID, $articleid));
     if (global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_ARTICLE_TYPE_ID, $this->_objConnection, self::TBL_SL_ARTICLE_TYPE_ID)) {
         $strSQLValueType = '';
         foreach ($articletype as $item) {
             $strSQLValueType .= '(\'' . $item . '\', \'' . $articleid . '\'),';
         }
         $strSQLValueType = global_common::cutLast($strSQLValueType);
         $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_ARTICLE_TYPE_ID, array(self::TBL_SL_ARTICLE_TYPE_ID, $strSQLValueType));
         if (!global_common::ExecuteMultiqueryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_ARTICLE_TYPE_ID, $this->_objConnection, self::TBL_SL_ARTICLE_TYPE_ID)) {
         }
         global_common::writeLog('Error add sl_article_type_id:' . $strSQL, 1);
     }
     return $articleid;
 }
Beispiel #5
0
 public function insert($username, $password, $fullname, $birthdate, $address, $phone, $email, $sex, $identity, $roleid, $userrankid, $avatar, $accountid, $isactived)
 {
     $strTableName = self::TBL_SL_USER;
     $intID = global_common::getMaxValueofField(global_mapping::UserID, $strTableName) + 1;
     $password = md5($intID . md5($password));
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_USER, array(self::TBL_SL_USER, null, global_common::escape_mysql_string($username), global_common::escape_mysql_string($password), global_common::escape_mysql_string($fullname), global_common::formatDateTimeSQL($birthdate), global_common::escape_mysql_string($address), global_common::escape_mysql_string($phone), global_common::escape_mysql_string($email), global_common::escape_mysql_string($sex), global_common::escape_mysql_string($identity), global_common::escape_mysql_string($roleid), global_common::escape_mysql_string($userrankid), global_common::escape_mysql_string($avatar), global_common::escape_mysql_string($accountid), global_common::escape_mysql_string($isactived)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_USER, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_user:' . $strSQL, 1);
         return false;
     }
     return $this->getUserByName($username);
 }