Esempio n. 1
0
 public function insert($likeamount, $unlikeamount, $likeusers, $unlikeusers)
 {
     $intID = global_common::getMaxID(self::TBL_SL_LIKE);
     $strTableName = self::TBL_SL_LIKE;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_LIKE, array(self::TBL_SL_LIKE, $intID, global_common::escape_mysql_string($likeamount), global_common::escape_mysql_string($unlikeamount), global_common::escape_mysql_string($likeusers), global_common::escape_mysql_string($unlikeusers)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_LIKE, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_like:' . $strSQL, 1);
         return false;
     }
     return $intID;
 }
Esempio n. 2
0
 public function insert($subcontents, $type)
 {
     $intID = global_common::getMaxID(self::TBL_SL_CONTENT_SUMMARY);
     $strTableName = self::TBL_SL_CONTENT_SUMMARY;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_CONTENT_SUMMARY, array(self::TBL_SL_CONTENT_SUMMARY, $intID, global_common::escape_mysql_string($subcontents), global_common::escape_mysql_string($type)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_CONTENT_SUMMARY, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_content_summary:' . $strSQL, 1);
         return false;
     }
     return $intID;
 }
Esempio n. 3
0
 public function insert($price, $offereddate, $deleteddate, $isdelete, $status)
 {
     $intID = global_common::getMaxID(self::TBL_SL_OFFER);
     $strTableName = self::TBL_SL_OFFER;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_OFFER, array(self::TBL_SL_OFFER, $intID, global_common::escape_mysql_string($price), global_common::escape_mysql_string($offereddate), global_common::escape_mysql_string($deleteddate), global_common::escape_mysql_string($isdelete), global_common::escape_mysql_string($status)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_OFFER, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_offer:' . $strSQL, 1);
         return false;
     }
     return $intID;
 }
Esempio n. 4
0
 public function insert($articleid, $numevaluation, $evaluatedby, $lastevaluated)
 {
     $intID = global_common::getMaxID(self::TBL_SL_EVALUATION);
     $strTableName = self::TBL_SL_EVALUATION;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_EVALUATION, array(self::TBL_SL_EVALUATION, $intID, global_common::escape_mysql_string($articleid), global_common::escape_mysql_string($numevaluation), global_common::escape_mysql_string($evaluatedby), global_common::escape_mysql_string($lastevaluated)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_EVALUATION, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_evaluation:' . $strSQL, 1);
         return false;
     }
     return $intID;
 }
Esempio n. 5
0
 public function insert($description, $reportedby, $reporteddate, $createdby, $createddate, $modifiedby, $modifieddate, $deletedby, $deleteddate, $isdeleted, $status)
 {
     $intID = global_common::getMaxID(self::TBL_SL_COMMENT_BAD);
     $strTableName = self::TBL_SL_COMMENT_BAD;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_COMMENT_BAD, array(self::TBL_SL_COMMENT_BAD, $intID, global_common::escape_mysql_string($description), global_common::escape_mysql_string($reportedby), global_common::escape_mysql_string($reporteddate), 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)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_COMMENT_BAD, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_comment_bad:' . $strSQL, 1);
         return false;
     }
     return $intID;
 }
Esempio n. 6
0
 public function insert($advertisingname, $partnerid, $startdate, $enddate, $adtypeid, $imagelink, $createdby, $createddate, $modifiedby, $modifieddate, $deletedby, $deleteddate, $isdeleted, $status)
 {
     $intID = global_common::getMaxID(self::TBL_SL_ADVERTISING);
     $strTableName = self::TBL_SL_ADVERTISING;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_ADVERTISING, array(self::TBL_SL_ADVERTISING, $intID, global_common::escape_mysql_string($advertisingname), global_common::escape_mysql_string($partnerid), global_common::escape_mysql_string($startdate), global_common::escape_mysql_string($enddate), global_common::escape_mysql_string($adtypeid), global_common::escape_mysql_string($imagelink), 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)));
     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 $intID;
 }
Esempio n. 7
0
 public function insert($adtypename, $width, $height, $numofday, $displaypage, $shareditem, $price, $cityid, $createdby, $createddate, $modifiedby, $modifieddate, $deletedby, $deleteddate, $isdeleted, $status)
 {
     $intID = global_common::getMaxID(self::TBL_SL_AD_TYPE);
     $strTableName = self::TBL_SL_AD_TYPE;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_AD_TYPE, array(self::TBL_SL_AD_TYPE, $intID, global_common::escape_mysql_string($adtypename), global_common::escape_mysql_string($width), global_common::escape_mysql_string($height), global_common::escape_mysql_string($numofday), global_common::escape_mysql_string($displaypage), global_common::escape_mysql_string($shareditem), global_common::escape_mysql_string($price), global_common::escape_mysql_string($cityid), 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)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_AD_TYPE, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_ad_type:' . $strSQL, 1);
         return false;
     }
     return $intID;
 }
Esempio n. 8
0
 public function insert($menuname, $link, $numorder, $isdeleted, $createdby, $createddate, $modifiedby, $modifieddate, $deletedby, $deleteddate, $level, $parentid)
 {
     $intID = global_common::getMaxID(self::TBL_SL_MENU);
     $strTableName = self::TBL_SL_MENU;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_MENU, array(self::TBL_SL_MENU, $intID, global_common::escape_mysql_string($menuname), global_common::escape_mysql_string($link), global_common::escape_mysql_string($numorder), global_common::escape_mysql_string($isdeleted), 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($level), global_common::escape_mysql_string($parentid)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_MENU, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_menu:' . $strSQL, 1);
         return false;
     }
     return $intID;
 }
Esempio n. 9
0
 public function insert($contentrequest, $requestedby, $requesteddate, $contentrespone, $responedby, $responeddate, $isapproved, $isdeleted)
 {
     $intID = global_common::getMaxID(self::TBL_SL_REQUEST);
     $strTableName = self::TBL_SL_REQUEST;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_REQUEST, array(self::TBL_SL_REQUEST, $intID, global_common::escape_mysql_string($contentrequest), global_common::escape_mysql_string($requestedby), global_common::escape_mysql_string($requesteddate), global_common::escape_mysql_string($contentrespone), global_common::escape_mysql_string($responedby), global_common::escape_mysql_string($responeddate), global_common::escape_mysql_string($isapproved), global_common::escape_mysql_string($isdeleted)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_REQUEST, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_request:' . $strSQL, 1);
         return false;
     }
     return $intID;
 }
Esempio n. 10
0
 public function insert($productid, $startdate, $enddate, $startingprice, $numoffer, $createdby, $createddate, $modifiedby, $modifieddate, $deletedby, $deleteddate, $status, $isdeleted)
 {
     $intID = global_common::getMaxID(self::TBL_SL_AUCTION);
     $strTableName = self::TBL_SL_AUCTION;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_AUCTION, array(self::TBL_SL_AUCTION, $intID, global_common::escape_mysql_string($productid), global_common::escape_mysql_string($startdate), global_common::escape_mysql_string($enddate), global_common::escape_mysql_string($startingprice), global_common::escape_mysql_string($numoffer), 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($status), global_common::escape_mysql_string($isdeleted)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_AUCTION, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_auction:' . $strSQL, 1);
         return false;
     }
     return $intID;
 }
Esempio n. 11
0
 public function insert($paymentmodename, $createdby, $createddate, $modifiedby, $modifieddate, $deletedby, $deleteddate, $isdeleted)
 {
     $intID = global_common::getMaxID(self::TBL_SL_PAYMENT_MODE);
     $strTableName = self::TBL_SL_PAYMENT_MODE;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_PAYMENT_MODE, array(self::TBL_SL_PAYMENT_MODE, $intID, global_common::escape_mysql_string($paymentmodename), 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)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_PAYMENT_MODE, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_payment_mode:' . $strSQL, 1);
         return false;
     }
     return $intID;
 }
Esempio n. 12
0
 public function insert($prefix, $title, $filename, $articletype, $content, $notificationtype, $tags, $catalogueid, $sectionid, $numview, $numcomment, $createdby, $createddate, $modifiedby, $modifieddate, $deletedby, $deleteddate, $isdeleted, $status)
 {
     //$intID = global_common::getMaxID(self::TBL_SL_ARTICLE);
     $date = global_common::getDateTime();
     $intID = global_common::buildIDByMonth(global_common::getMaxID(Model_Article::TBL_SL_ARTICLE), $date, Model_Article::TABLE_BY_MONTHS_ARTICLE);
     $strTableName = global_common::builtTableName(Model_Article::TBL_SL_ARTICLE, global_common::getTableSuffixByMonth($intID));
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_ARTICLE, array($strTableName, $intID, global_common::escape_mysql_string($prefix), global_common::escape_mysql_string($title), global_common::escape_mysql_string($filename), global_common::escape_mysql_string($articletype), global_common::escape_mysql_string($content), global_common::escape_mysql_string($notificationtype), global_common::escape_mysql_string($tags), global_common::escape_mysql_string($catalogueid), global_common::escape_mysql_string($sectionid), 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)));
     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;
     } else {
         $arrResult = global_common::updateContents($this->_objConnection, $articletype, $intID, global_common::ARTICLE_TYPE);
         if (!$arrResult) {
             global_common::writeLog('sp_update_content_summary: ' . $strSQL, 1);
         }
     }
     return $intID;
 }
Esempio n. 13
0
 public function insert($propertyname, $productid, $propertyvalue, $datatypeid, $createdby, $createddate, $modifiedby, $modifieddate, $deletedby, $deleteddate, $isdeleted, $status)
 {
     $intID = global_common::getMaxID(self::TBL_SL_PROPERTY);
     $strTableName = self::TBL_SL_PROPERTY;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_PROPERTY, array(self::TBL_SL_PROPERTY, $intID, global_common::escape_mysql_string($propertyname), global_common::escape_mysql_string($productid), global_common::escape_mysql_string($propertyvalue), global_common::escape_mysql_string($datatypeid), 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)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_PROPERTY, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_property:' . $strSQL, 1);
         return false;
     }
     return $intID;
 }
Esempio n. 14
0
 public function insert($username, $password, $fullname, $birthdate, $address, $phone, $email, $sex, $identity, $roleid, $userrankid, $avatar, $accountid, $isactived)
 {
     $intID = global_common::getMaxID(self::TBL_SL_USER);
     $password = self::getPassword($username, $password);
     $strTableName = self::TBL_SL_USER;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_USER, array(self::TBL_SL_USER, $intID, global_common::escape_mysql_string($username), global_common::escape_mysql_string($password), global_common::escape_mysql_string($fullname), global_common::escape_mysql_string($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 $intID;
 }
Esempio n. 15
0
 public function insert($currencyname, $eurorate, $usdrate, $audrate, $ndtrate, $cadrate, $gbprate, $createdby, $createddate, $modifiedby, $modifieddate, $deletedby, $deleteddate, $isdeleted)
 {
     $intID = global_common::getMaxID(self::TBL_SL_CURRENCY);
     $strTableName = self::TBL_SL_CURRENCY;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_CURRENCY, array(self::TBL_SL_CURRENCY, $intID, global_common::escape_mysql_string($currencyname), global_common::escape_mysql_string($eurorate), global_common::escape_mysql_string($usdrate), global_common::escape_mysql_string($audrate), global_common::escape_mysql_string($ndtrate), global_common::escape_mysql_string($cadrate), global_common::escape_mysql_string($gbprate), 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)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_CURRENCY, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_currency:' . $strSQL, 1);
         return false;
     }
     return $intID;
 }
Esempio n. 16
0
 public function insert($productname, $catalogueid, $imagelink, $manufactoryid, $paymentmodeid, $numberaireid, $storagedate, $price, $amount, $description, $createdby, $createddate, $modifiedby, $modifieddate, $deletedby, $deleteddate, $isdeleted, $status)
 {
     $intID = global_common::getMaxID(self::TBL_SL_PRODUCT);
     $strTableName = self::TBL_SL_PRODUCT;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_PRODUCT, array(self::TBL_SL_PRODUCT, $intID, global_common::escape_mysql_string($productname), global_common::escape_mysql_string($catalogueid), global_common::escape_mysql_string($imagelink), global_common::escape_mysql_string($manufactoryid), global_common::escape_mysql_string($paymentmodeid), global_common::escape_mysql_string($numberaireid), global_common::escape_mysql_string($storagedate), global_common::escape_mysql_string($price), global_common::escape_mysql_string($amount), global_common::escape_mysql_string($description), 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)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_PRODUCT, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_product:' . $strSQL, 1);
         return false;
     }
     return $intID;
 }
Esempio n. 17
0
 public function insert($userid, $partnername, $company, $address1, $email1, $phone1, $website1, $createdby)
 {
     $intID = global_common::getMaxID(self::TBL_SL_PARTNER);
     $strTableName = self::TBL_SL_PARTNER;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_PARTNER, array(self::TBL_SL_PARTNER, $intID, global_common::escape_mysql_string($userid), global_common::escape_mysql_string($partnername), global_common::escape_mysql_string($company), global_common::escape_mysql_string($address1), global_common::escape_mysql_string($addressname1), global_common::escape_mysql_string($address2), global_common::escape_mysql_string($addressname2), global_common::escape_mysql_string($address3), global_common::escape_mysql_string($addressname3), global_common::escape_mysql_string($address4), global_common::escape_mysql_string($addressname4), global_common::escape_mysql_string($address5), global_common::escape_mysql_string($addressname5), global_common::escape_mysql_string($email1), global_common::escape_mysql_string($emailname1), global_common::escape_mysql_string($email2), global_common::escape_mysql_string($emailname2), global_common::escape_mysql_string($email3), global_common::escape_mysql_string($emailname3), global_common::escape_mysql_string($email4), global_common::escape_mysql_string($emailname4), global_common::escape_mysql_string($email5), global_common::escape_mysql_string($emailname5), global_common::escape_mysql_string($phone1), global_common::escape_mysql_string($phonename1), global_common::escape_mysql_string($phone2), global_common::escape_mysql_string($phonename2), global_common::escape_mysql_string($phone3), global_common::escape_mysql_string($phonename3), global_common::escape_mysql_string($phone4), global_common::escape_mysql_string($phonename4), global_common::escape_mysql_string($phone5), global_common::escape_mysql_string($phonename5), global_common::escape_mysql_string($fax1), global_common::escape_mysql_string($faxname1), global_common::escape_mysql_string($fax2), global_common::escape_mysql_string($faxname2), global_common::escape_mysql_string($fax3), global_common::escape_mysql_string($faxname3), global_common::escape_mysql_string($fax4), global_common::escape_mysql_string($faxname4), global_common::escape_mysql_string($fax5), global_common::escape_mysql_string($faxname5), global_common::escape_mysql_string($website1), global_common::escape_mysql_string($websitename1), global_common::escape_mysql_string($website2), global_common::escape_mysql_string($websitename2), global_common::escape_mysql_string($website3), global_common::escape_mysql_string($websitename3), global_common::escape_mysql_string($website4), global_common::escape_mysql_string($websitename4), global_common::escape_mysql_string($website5), global_common::escape_mysql_string($websitename5), global_common::escape_mysql_string($taxnumber), global_common::escape_mysql_string($accountnumber), global_common::escape_mysql_string($createdby), global_common::nowSQL(), 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($status), global_common::escape_mysql_string($isdeleted)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_PARTNER, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_partner:' . $strSQL, 1);
         return false;
     }
     return $intID;
 }
Esempio n. 18
0
 public function insert($notificationtypename, $createdby, $createddate, $modifiedby, $modifieddate, $deletedby, $deleteddate, $isdeleted, $status)
 {
     $intID = global_common::getMaxID(self::TBL_SL_NOTIFICATION_TYPE);
     $strTableName = self::TBL_SL_NOTIFICATION_TYPE;
     $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_NOTIFICATION_TYPE, array(self::TBL_SL_NOTIFICATION_TYPE, $intID, global_common::escape_mysql_string($notificationtypename), 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)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_NOTIFICATION_TYPE, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_notification_type:' . $strSQL, 1);
         return false;
     }
     return $intID;
 }
Esempio n. 19
0
 public function insert($commenttype, $articleid, $content)
 {
     $date = global_common::getDateTime();
     $intID = global_common::buildIDByMonth(global_common::getMaxID(self::TBL_SL_COMMENT), $date, Model_Comment::TABLE_BY_MONTHS_COMMENT);
     //echo 'Comment id:'.$intID;
     //$intID = global_common::getMaxID(self::TBL_SL_COMMENT);
     // lấy tên table c_comment_detail_ để lưu thông tin comment
     $strTableName = global_common::builtTableName(Model_Comment::TBL_SL_COMMENT, global_common::getTableSuffixByMonth($intID));
     //$strTableName = self::TBL_SL_COMMENT;
     $strSQL = global_common::prepareQuery(Model_Comment::SQL_INSERT_SL_COMMENT, array($strTableName, $intID, global_common::escape_mysql_string($commenttype), global_common::escape_mysql_string($articleid), global_common::escape_mysql_string($content), 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)));
     //echo $strSQL;
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, Model_Comment::SQL_CREATE_TABLE_SL_COMMENT, $this->_objConnection, $strTableName)) {
         global_common::writeLog('Error add sl_comment:' . $strSQL, 1);
         return false;
     } else {
         $arrResult = global_common::updateContents($this->_objConnection, $articleid, $intID, global_common::COMMENT_TYPE);
         if (!$arrResult) {
             global_common::writeLog('sp_update_content_summary: ' . $strSQL, 1);
         }
     }
     return $intID;
 }