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


PHP Item::store方法代码示例

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


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

示例1: store

    public function store()
    {
        global $g_pdo;
        parent::store();
        $request = <<<EOF
INSERT INTO `item_ticket`
SET
\t`obj_id`= :obj_id,
\t`event_name`= :event_name,
\t`event_rate_name`= :event_rate_name,
\t`event_rate_amount`= :event_rate_amount,
\t`event_rate_tax`= :event_rate_tax,
\t`attendee_firstname`= :attendee_firstname,
\t`attendee_lastname`= :attendee_lastname,
\t`attendee_title`= :attendee_title,
\t`id_ticket`= :id_ticket
EOF;
        $pst = $g_pdo->prepare($request);
        $array = array(":obj_id" => $this->id, ":event_name" => $this->event_name, ":event_rate_name" => $this->event_rate_name, ":event_rate_amount" => $this->event_rate_amount, ":event_rate_tax" => $this->event_rate_tax, ":attendee_firstname" => $this->attendee_firstname, ":attendee_lastname" => $this->attendee_lastname, ":attendee_title" => $this->attendee_title, ":id_ticket" => $this->ticket_id);
        $pst->execute($array);
    }
开发者ID:centaurustech,项目名称:truc,代码行数:21,代码来源:ItemTicket.class.php

示例2: store

 /**
  * Overriden store() method to set status to finished if rcpcount is 0
  */
 public function store()
 {
     if ($this->get("rcpcount") == 0) {
         // No recipients, job finished
         $this->set("status", 9);
         if ($this->get("started") == "0000-00-00 00:00:00") {
             $this->set("started", date("Y-m-d H:i:s"), false);
         }
         $this->set("finished", date("Y-m-d H:i:s"), false);
     }
     parent::store();
 }
开发者ID:Spider-IT-Deutschland,项目名称:drugCMS-Plugin_newsletter,代码行数:15,代码来源:class.newsletter.jobs.php

示例3: store

 /**
  * Overriden store()-Method to set modified and modifiedby data and
  * to ensure, that there is only one welcome newsletter
  */
 public function store()
 {
     global $client, $lang, $auth;
     $client = Contenido_Security::toInteger($client);
     $lang = Contenido_Security::toInteger($lang);
     $this->set("modified", date("Y-m-d H:i:s"), false);
     $this->set("modifiedby", $auth->auth["uid"]);
     if ($this->get("welcome") == 1) {
         $oItems = new NewsletterCollection();
         $oItems->setWhere("idclient", $client);
         $oItems->setWhere("idlang", $lang);
         $oItems->setWhere("welcome", 1);
         $oItems->setWhere("idnews", $this->get("idnews"), "<>");
         $oItems->query();
         while ($oItem = $oItems->next()) {
             $oItem->set("welcome", 0);
             $oItem->store();
         }
         unset($oItem);
         unset($oItems);
     }
     parent::store();
 }
开发者ID:Spider-IT-Deutschland,项目名称:drugCMS-Plugin_newsletter,代码行数:27,代码来源:class.newsletter.php

示例4: store

 /**
  * Overriden store() method to ensure, that there is only one default group
  **/
 public function store()
 {
     global $client, $lang;
     $client = Contenido_Security::toInteger($client);
     $lang = Contenido_Security::toInteger($lang);
     if ($this->get("defaultgroup") == 1) {
         $oItems = new RecipientGroupCollection();
         $oItems->setWhere("idclient", $client);
         $oItems->setWhere("idlang", $lang);
         $oItems->setWhere("defaultgroup", 1);
         $oItems->setWhere("idnewsgroup", $this->get("idnewsgroup"), "<>");
         $oItems->query();
         while ($oItem = $oItems->next()) {
             $oItem->set("defaultgroup", 0);
             $oItem->store();
         }
     }
     parent::store();
 }
开发者ID:Spider-IT-Deutschland,项目名称:drugCMS-Plugin_newsletter,代码行数:22,代码来源:class.newsletter.groups.php

示例5: setCatLang

 /**
  * setCatLang sets the idcatlang for the current item. Should
  * only be called by the create function.
  * @param int $idcatlang idcatlang to set.
  */
 function setCatLang($idcatlang)
 {
     global $cfg;
     $allocations = new WorkflowAllocations();
     $allocations->select("idcatlang = '{$idcatlang}'");
     if ($allocations->next() !== false) {
         $this->lasterror = i18n("Category already has a workflow assigned", "workflow");
         return false;
     }
     $db = new DB_Contenido();
     $sql = "SELECT idcatlang FROM " . $cfg["tab"]["cat_lang"] . " WHERE idcatlang = '" . Contenido_Security::toInteger($idcatlang) . "'";
     $db->query($sql);
     if (!$db->next_record()) {
         $this->lasterror = i18n("Category doesn't exist, assignment failed", "workflow");
         return false;
     }
     parent::setField("idcatlang", $idcatlang);
     parent::store();
     return true;
 }
开发者ID:Spider-IT-Deutschland,项目名称:drugCMS-Plugin_Workflow,代码行数:25,代码来源:class.workflowallocation.php

示例6: setPosition

 /**
  * setPosition Sets the position for an item. Should only be 
  * called by the "swap" function
  * @param int $idposition The new position ID
  */
 function setPosition($idposition)
 {
     parent::setField("position", $idposition);
     parent::store();
     return true;
 }
开发者ID:Spider-IT-Deutschland,项目名称:drugCMS-Plugin_Workflow,代码行数:11,代码来源:class.workflowitems.php

示例7: store

 /**
  * Overriden store function to send mails 
  * @param none
  */
 function store()
 {
     global $cfg, $encoding, $lang;
     $sMailhost = getSystemProperty('system', 'mail_host');
     if ($sMailhost == '') {
         $sMailhost = 'localhost';
     }
     //modified : 2008-06-25 - use php mailer class instead of mail()
     $oMail = new PHPMailer();
     $oMail->CharSet = isset($encoding[$lang]) ? $encoding[$lang] : 'UTF-8';
     $oMail->Host = $sMailhost;
     $oMail->IsHTML(0);
     $oMail->WordWrap = 1000;
     $oMail->IsMail();
     if (array_key_exists("idusersequence", $this->modifiedValues)) {
         $usersequence = new WorkflowUserSequence();
         $usersequence->loadByPrimaryKey($this->values["idusersequence"]);
         $email = $usersequence->get("emailnoti");
         $escal = $usersequence->get("escalationnoti");
         if ($email == 1 || $escal == 1) {
             /* Grab the required informations */
             $curEditor = getGroupOrUserName($usersequence->get("iduser"));
             $idartlang = $this->get("idartlang");
             $timeunit = $usersequence->get("timeunit");
             $timelimit = $usersequence->get("timelimit");
             $db = new DB_Contenido();
             $sql = "SELECT author, title, idart FROM " . $cfg["tab"]["art_lang"] . " WHERE idartlang = '" . Contenido_Security::escapeDB($idartlang, $db) . "'";
             $db->query($sql);
             if ($db->next_record()) {
                 $idart = $db->f("idart");
                 $title = $db->f("title");
                 $author = $db->f("author");
             }
             /* Extract category */
             $sql = "SELECT idcat FROM " . $cfg["tab"]["cat_art"] . " WHERE idart = '" . Contenido_Security::escapeDB($idart, $db) . "'";
             $db->query($sql);
             if ($db->next_record()) {
                 $idcat = $db->f("idcat");
             }
             $sql = "SELECT name FROM " . $cfg["tab"]["cat_lang"] . " WHERE idcat = '" . Contenido_Security::escapeDB($idcat, $db) . "'";
             $db->query($sql);
             if ($db->next_record()) {
                 $catname = $db->f("name");
             }
             $starttime = $this->get("starttime");
             $starttime = strtotime(substr_replace(substr(substr($starttime, 0, 2) . chunk_split(substr($starttime, 2, 6), 2, "-") . chunk_split(substr($starttime, 8), 2, ":"), 0, 19), " ", 10, 1));
             switch ($timeunit) {
                 case "Seconds":
                     $maxtime = $starttime + $timelimit;
                     break;
                 case "Minutes":
                     $maxtime = $starttime + $timelimit * 60;
                     break;
                 case "Hours":
                     $maxtime = $starttime + $timelimit * 3600;
                     break;
                 case "Days":
                     $maxtime = $starttime + $timelimit * 86400;
                     break;
                 case "Weeks":
                     $maxtime = $starttime + $timelimit * 604800;
                     break;
                 case "Months":
                     $maxtime = $starttime + $timelimit * 2678400;
                     break;
                 case "Years":
                     $maxtime = $starttime + $timelimit * 31536000;
                     break;
                 default:
                     $maxtime = $starttime + $timelimit;
             }
             if ($email == 1) {
                 $email = i18n("Hello %s,\n\n" . "you are assigned as the next editor for the Article %s.\n\n" . "More informations:\n" . "Article: %s\n" . "Category: %s\n" . "Editor: %s\n" . "Author: %s\n" . "Editable from: %s\n" . "Editable to: %s\n");
                 $filledMail = sprintf($email, $curEditor, $title, $title, $catname, $curEditor, $author, date("Y-m-d H:i:s", $starttime), date("Y-m-d H:i:s", $maxtime));
                 $user = new User();
                 if (isGroup($usersequence->get("iduser"))) {
                     $sql = "select idgroupuser, user_id FROM " . $cfg["tab"]["groupmembers"] . " WHERE\n            \t\t\t\t\t\tgroup_id = '" . Contenido_Security::escapeDB($usersequence->get("iduser"), $db) . "'";
                     $db->query($sql);
                     while ($db->next_record()) {
                         $user->loadUserByUserID($db->f("user_id"));
                         //modified : 2008-06-25 - use php mailer class instead of mail()
                         $oMail->AddAddress($user->getField("email"), "");
                         $oMail->Subject = stripslashes(i18n('Workflow notification', "workflow"));
                         $oMail->Body = $filledMail;
                         $oMail->Send();
                     }
                 } else {
                     $user->loadUserByUserID($usersequence->get("iduser"));
                     //modified : 2008-06-25 - use php mailer class instead of mail()
                     $oMail->AddAddress($user->getField("email"), "");
                     $oMail->Subject = stripslashes(i18n('Workflow notification', "workflow"));
                     $oMail->Body = $filledMail;
                     $oMail->Send();
                 }
             } else {
                 $email = "Hello %s,\n\n" . "you are assigned as the escalator for the Article %s.\n\n" . "More informations:\n" . "Article: %s\n" . "Category: %s\n" . "Editor: %s\n" . "Author: %s\n" . "Editable from: %s\n" . "Editable to: %s\n";
//.........这里部分代码省略.........
开发者ID:Spider-IT-Deutschland,项目名称:drugCMS-Plugin_Workflow,代码行数:101,代码来源:class.workflowartallocation.php

示例8: store

 public function store()
 {
     global $auth;
     $this->set("lastmodified", date("Y-m-d H:i:s"), false);
     $this->set("modifiedby", $auth->auth["uid"]);
     parent::store();
     // Update name, email and newsletter type for recipients in pending newsletter jobs
     $sName = $this->get("name");
     $sEmail = $this->get("email");
     if ($sName == "") {
         $sName = $sEmail;
     }
     $iNewsType = $this->get("news_type");
     $oLogs = new cNewsletterLogCollection();
     $oLogs->setWhere("idnewsrcp", $this->get($this->primaryKey));
     $oLogs->setWhere("status", "pending");
     $oLogs->query();
     while ($oLog = $oLogs->next()) {
         $oLog->set("rcpname", $sName);
         $oLog->set("rcpemail", $sEmail);
         $oLog->set("rcpnewstype", $iNewsType);
         $oLog->store();
     }
 }
开发者ID:Spider-IT-Deutschland,项目名称:drugCMS-Plugin_newsletter,代码行数:24,代码来源:class.newsletter.recipients.php


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