• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP xoops_trim函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: formulaire_upload

/**
 * Gestion de l'upload
 */
function formulaire_upload($indice, $dstpath, $destname, $permittedtypes, $maxUploadSize)
{
    //	global $destname;
    //$permittedtypes = array("image/gif","image/pjpeg","image/jpeg","image/x-png") ;
    $permittedtypes = $allowed_mimetypes;
    if (isset($_POST['xoops_upload_file'])) {
        include_once XOOPS_ROOT_PATH . '/class/uploader.php';
        if (isset($_FILES[$_POST['xoops_upload_file'][$indice]])) {
            $fldname = $_FILES[$_POST['xoops_upload_file'][$indice]];
            $fldname = get_magic_quotes_gpc() ? stripslashes($fldname['name']) : $fldname['name'];
            if (xoops_trim($fldname != '')) {
                $uploader = new XoopsMediaUploader($dstpath, $permittedtypes, $maxUploadSize);
                if ($uploader->fetchMedia($_POST['xoops_upload_file'][$indice])) {
                    if ($uploader->upload()) {
                        return true;
                    } else {
                        echo _ERRORS . ' ' . $uploader->getErrors();
                        echo "indice :" . $indice . "<br> dstpath :" . $dstpath . "<br> destname :" . $destname . " - " . $uploadDestName . "<br> permittedtypes :" . $permittedtypes[0] . "-" . $permittedtypes[1] . "-" . $permittedtypes[2] . "-" . $permittedtypes[3] . "<br>Max upload file:" . $maxUploadSize;
                        exit;
                    }
                } else {
                    echo $uploader->getErrors();
                }
            }
        }
    }
    return false;
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:formulaire.php


示例2: listCart

function listCart()
{
    global $xoopsTpl, $uid;
    $cartForTemplate = $discountsDescription = array();
    $emptyCart = false;
    $shippingAmount = $commandAmount = $vatAmount = $commandAmountTTC = $discountsCount = 0;
    $goOn = '';
    $reductions = new myshop_reductions();
    $reductions->computeCart($cartForTemplate, $emptyCart, $shippingAmount, $commandAmount, $vatAmount, $goOn, $commandAmountTTC, $discountsDescription, $discountsCount);
    $myshop_Currency =& myshop_Currency::getInstance();
    $xoopsTpl->assign('emptyCart', $emptyCart);
    // Empty
    $xoopsTpl->assign('caddieProducts', $cartForTemplate);
    // Products
    $xoopsTpl->assign('shippingAmount', $myshop_Currency->amountForDisplay($shippingAmount));
    $xoopsTpl->assign('commandAmount', $myshop_Currency->amountForDisplay($commandAmount));
    $xoopsTpl->assign('vatAmount', $myshop_Currency->amountForDisplay($vatAmount));
    $xoopsTpl->assign('discountsCount', $discountsCount);
    $xoopsTpl->assign('goOn', $goOn);
    $xoopsTpl->assign('commandAmountTTC', $myshop_Currency->amountForDisplay($commandAmountTTC, 'l'));
    $xoopsTpl->assign('discountsDescription', $discountsDescription);
    $showOrderButton = true;
    if (xoops_trim(myshop_utils::getModuleOption('paypal_email')) == '' && myshop_utils::getModuleOption('offline_payment') == 0) {
        $showOrderButton = false;
    }
    $showRegistredOnly = false;
    if (myshop_utils::getModuleOption('restrict_orders', false) && $uid == 0) {
        $showRegistredOnly = true;
        $showOrderButton = false;
    }
    $xoopsTpl->assign('showRegistredOnly', $showRegistredOnly);
    $xoopsTpl->assign('showOrderButton', $showOrderButton);
}
开发者ID:naao,项目名称:myshop,代码行数:33,代码来源:caddy.php


示例3: getFormContent

 /**
  * Renvoie les éléments à ajouter au formulaire en tant que zones cachées
  *
  * @param integer $commmandId
  * @param float $ttc
  */
 function getFormContent($commandId, $ttc, $emailClient)
 {
     global $xoopsConfig;
     $ret = array();
     $ret['cmd'] = '_xclick';
     $ret['upload'] = '1';
     $ret['currency_code'] = $this->moneyCode;
     $ret['business'] = $this->email;
     $ret['return'] = MYSHOP_URL . 'thankyou.php';
     // Page (générique) de remerciement après paiement
     $ret['image_url'] = XOOPS_URL . '/images/logo.gif';
     $ret['cpp_header_image'] = XOOPS_URL . '/images/logo.gif';
     $ret['invoice'] = $commandId;
     $ret['item_name'] = _MYSHOP_COMMAND . $commandId . ' - ' . $xoopsConfig['sitename'];
     $ret['item_number'] = $commandId;
     $ret['tax'] = 0;
     // ajout 25/03/2008
     $ret['amount'] = $this->formatAmount($ttc);
     $ret['custom'] = $commandId;
     //$ret['rm'] = 2;	// Return data by POST (normal)
     $ret['email'] = $emailClient;
     // paypal_pdt
     if (xoops_trim($this->passwordCancel) != '') {
         // URL à laquelle le navigateur du client est ramené si le paiement est annulé
         $ret['cancel_return'] = MYSHOP_URL . 'cancel-payment.php?id=' . $this->passwordCancel;
     }
     if ($this->useIpn == 1) {
         $ret['notify_url'] = MYSHOP_URL . 'paypal-notify.php';
     }
     return $ret;
 }
开发者ID:naao,项目名称:myshop,代码行数:37,代码来源:myshop_paypal.php


示例4: fetch

 function fetch()
 {
     parent::fetch();
     $t_queries = array();
     $myts =& MyTextSanitizer::getInstance();
     if ($this->get('andor') == 'exact' && strlen($this->get('query')) >= $this->_mKeywordMin) {
         $this->mQueries[] = $myts->addSlashes($this->get('query'));
     } else {
         $query = $this->get('query');
         if (defined('XOOPS_USE_MULTIBYTES')) {
             $query = xoops_trim($query);
         }
         $separator = '/[\\s,]+/';
         if (defined('_MD_LEGACY_FORMAT_SEARCH_SEPARATOR')) {
             $separator = _MD_LEGACY_FORMAT_SEARCH_SEPARATOR;
         }
         $tmpArr = preg_split($separator, $query);
         foreach ($tmpArr as $tmp) {
             if (strlen($tmp) >= $this->_mKeywordMin) {
                 $this->mQueries[] = $myts->addSlashes($tmp);
             }
         }
     }
     $this->set('query', implode(" ", $this->mQueries));
 }
开发者ID:hiro1173,项目名称:legacy,代码行数:25,代码来源:SearchResultsForm.class.php


示例5: userCheck

function userCheck($uname, $email, $pass, $vpass)
{
    global $myxoopsConfigUser;
    $xoopsDB =& Database::getInstance();
    $stop = '';
    if (!checkEmail($email)) {
        $stop .= _US_INVALIDMAIL . '<br />';
    }
    foreach ($myxoopsConfigUser['bad_emails'] as $be) {
        if (!empty($be) && preg_match('/' . $be . '/i', $email)) {
            $stop .= _US_INVALIDMAIL . '<br />';
            break;
        }
    }
    if (strrpos($email, ' ') > 0) {
        $stop .= _US_EMAILNOSPACES . '<br />';
    }
    $uname = xoops_trim($uname);
    $restrictions = array(0 => '/[^a-zA-Z0-9\\_\\-]/', 1 => '/[^a-zA-Z0-9\\_\\-\\<\\>\\,\\.\\$\\%\\#\\@\\!\\\'\\"]/', 2 => '/[\\000-\\040]/');
    $restriction = $restrictions[$myxoopsConfigUser['uname_test_level']];
    if (empty($uname) || preg_match($restriction, $uname)) {
        $stop .= _US_INVALIDNICKNAME . '<br />';
    }
    if (strlen($uname) > $myxoopsConfigUser['maxuname']) {
        $stop .= sprintf(_US_NICKNAMETOOLONG, $myxoopsConfigUser['maxuname']) . '<br />';
    }
    if (strlen($uname) < $myxoopsConfigUser['minuname']) {
        $stop .= sprintf(_US_NICKNAMETOOSHORT, $myxoopsConfigUser['minuname']) . '<br />';
    }
    foreach ($myxoopsConfigUser['bad_unames'] as $bu) {
        if (!empty($bu) && preg_match('/' . $bu . '/i', $uname)) {
            $stop .= _US_NAMERESERVED . '<br />';
            break;
        }
    }
    if (strrpos($uname, ' ') > 0) {
        $stop .= _US_NICKNAMENOSPACES . '<br />';
    }
    $u_handler =& xoonips_getormhandler('xoonips', 'xoops_users');
    $criteria = new Criteria('uname', addslashes($uname));
    if ($u_handler->getCount($criteria) > 0) {
        $stop .= _US_NICKNAMETAKEN . "<br />";
    }
    if ($email) {
        $criteria = new Criteria('email', addslashes($email));
        if ($u_handler->getCount($criteria) > 0) {
            $stop .= _US_EMAILTAKEN . "<br />";
        }
    }
    if (!isset($pass) || $pass == '' || !isset($vpass) || $vpass == '') {
        $stop .= _US_ENTERPWD . '<br />';
    }
    if (isset($pass) && $pass != $vpass) {
        $stop .= _US_PASSNOTSAME . '<br />';
    } elseif ($pass != '' && strlen($pass) < $myxoopsConfigUser['minpass']) {
        $stop .= sprintf(_US_PWDTOOSHORT, $myxoopsConfigUser['minpass']) . '<br />';
    }
    return $stop;
}
开发者ID:XoopsModules25x,项目名称:xcl-module-xoonips,代码行数:59,代码来源:registeruser.php


示例6: pictureExists

 /**
  * Indique si l'image de la catégorie existe
  *
  * @return boolean Vrai si l'image existe sinon faux
  */
 public function pictureExists()
 {
     $return = false;
     if (xoops_trim($this->getVar('payment_image')) != '' && file_exists(OLEDRION_PICTURES_PATH . DIRECTORY_SEPARATOR . $this->getVar('payment_image'))) {
         $return = true;
     }
     return $return;
 }
开发者ID:osw17,项目名称:oledrion,代码行数:13,代码来源:oledrion_payment.php


示例7: pictureExists

 /**
  * Display if category image exists
  *
  * @return boolean
  */
 function pictureExists()
 {
     $return = false;
     if (xoops_trim($this->getVar('cat_imgurl')) != '' && file_exists(MYSHOP_PICTURES_PATH . DIRECTORY_SEPARATOR . $this->getVar('cat_imgurl'))) {
         $return = true;
     }
     return $return;
 }
开发者ID:naao,项目名称:myshop,代码行数:13,代码来源:myshop_cat.php


示例8: getOption

 /**
  * Retourne une option de l'attribut
  *
  * @param string $valueToGet
  * @param string $format
  * @return array
  * @since 2.3.2009.03.11
  */
 function getOption($valueToGet, $format = 'e')
 {
     $names = array();
     if (xoops_trim($this->getVar($valueToGet, $format)) != '') {
         $names = explode(OLEDRION_ATTRIBUTE_SEPARATOR, $this->getVar($valueToGet, $format));
     }
     return $names;
 }
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:16,代码来源:oledrion_caddy_attributes.php


示例9: getCurrentGateway

 /**
  * Retourne la passerelle de paiement en cours d'utilisation
  *
  * @return string	Le nom de la  passerelle de paiement (en fait le nom de son répertoire)
  */
 function getCurrentGateway()
 {
     $return = xoops_trim(oledrion_utils::getModuleOption('used_gateway'));
     if ($return == '') {
         $return = 'paypal';
         // Valeur par défaut
     }
     return $return;
 }
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:14,代码来源:oledrion_gateways.php


示例10: giveMimetype

 function giveMimetype($filename = '')
 {
     $cmimetype = new cmimetype();
     $workingfile = $this->downloadname;
     if (xoops_trim($filename) != '') {
         $workingfile = $filename;
         return $cmimetype->getType($workingfile);
     } else {
         return '';
     }
 }
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:11,代码来源:class.sfiles.php


示例11: pictureExists

 /**
  * Indique si une des 5 images du fabricant existe
  *
  * @param  integer $pictureNumber Le numéro (de 1 à 5) de l'image que l'on souhaite récupérer
  * @return boolean Vrai si l'image existe sinon faux
  */
 public function pictureExists($pictureNumber)
 {
     $pictureNumber = intval($pictureNumber);
     $return = false;
     if ($pictureNumber > 0 && $pictureNumber < 6) {
         if (xoops_trim($this->getVar('manu_photo' . $pictureNumber)) != '' && file_exists(OLEDRION_PICTURES_PATH . DIRECTORY_SEPARATOR . $this->getVar('manu_photo' . $pictureNumber))) {
             $return = true;
         }
     }
     return $return;
 }
开发者ID:osw17,项目名称:oledrion,代码行数:17,代码来源:oledrion_manufacturer.php


示例12: saveParametersForm

 function saveParametersForm($data)
 {
     if (xoops_trim($this->languageFilename) != '' && file_exists($this->languageFilename)) {
         require $this->languageFilename;
     }
     $gatewayName = $this->gatewayInformation['foldername'];
     $this->handlers->h_oledrion_gateways_options->deleteGatewayOptions($gatewayName);
     if (!$this->handlers->h_oledrion_gateways_options->setGatewayOptionValue($gatewayName, 'parsian_mid', $data['parsian_mid'])) {
         return false;
     }
     return true;
 }
开发者ID:osw17,项目名称:oledrion,代码行数:12,代码来源:gateway.php


示例13: addkeywords

 /**
  * Add one or many keywords
  */
 function addkeywords($keyword)
 {
     $myts =& MyTextSanitizer::getInstance();
     if (is_array($keyword)) {
         foreach ($keyword as $onekeyword) {
             $onekeyword = xoops_trim($myts->htmlSpecialChars($onekeyword));
             $this->keywords[$onekeyword] = $onekeyword;
         }
     } else {
         $keyword = xoops_trim($myts->htmlSpecialChars($keyword));
         $this->keywords[$keyword] = $keyword;
     }
 }
开发者ID:trabisdementia,项目名称:xuups,代码行数:16,代码来源:blacklist.php


示例14: b_marquee_mydownloads

function b_marquee_mydownloads($limit, $dateformat, $itemssize)
{
    include_once XOOPS_ROOT_PATH . '/modules/marquee/include/functions.php';
    include_once XOOPS_ROOT_PATH . '/include/comment_constants.php';
    $block = array();
    $myts =& MyTextSanitizer::getInstance();
    $db =& Database::getInstance();
    $result = $db->query("SELECT m.lid, m.cid, m.title, m.date, m.hits, m.submitter, c.title as catitle, u.name, u.uname FROM " . $db->prefix("mydownloads_downloads") . " m, " . $db->prefix("mydownloads_cat") . "  c, " . $db->prefix("users") . " u  WHERE (c.cid=m.cid) AND (m.submitter=u.uid) AND (m.status>0) ORDER BY m.date DESC", $limit, 0);
    while ($myrow = $db->fetchArray($result)) {
        $title = $myts->htmlSpecialChars($myrow["title"]);
        if ($itemssize > 0) {
            $title = xoops_substr($title, 0, $itemssize + 3);
        }
        $author = $myts->htmlSpecialChars($myrow["uname"]);
        if (xoops_trim($myrow["catitle"]) != '') {
            $author = $myts->htmlSpecialChars($myrow["name"]);
        }
        $category = $myts->htmlSpecialChars($myrow["catitle"]);
        $block[] = array('date' => formatTimestamp($myrow['date'], $dateformat), 'category' => $category, 'author' => $author, 'title' => $title, 'link' => "<a href='" . XOOPS_URL . '/modules/mydownloads/singlefile.php?cid=' . $myrow['cid'] . "&amp;lid=" . $myrow['lid'] . "'>" . $title . '</a>');
    }
    return $block;
}
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:22,代码来源:mydownloads.php


示例15: grabEntries

 function grabEntries(&$obj)
 {
     $ret = false;
     include XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
     $items = $h_oledrion_products->getRecentProducts(new oledrion_parameters(array('start' => 0, 'limit' => $this->grab)));
     $i = 0;
     if (false != $items && count($items) > 0) {
         foreach ($items as $item) {
             $ret[$i]['link'] = $ret[$i]['guid'] = $item->getLink();
             $ret[$i]['title'] = $item->getVar('product_title', 'n');
             $ret[$i]['timestamp'] = $item->getVar('product_submitted');
             if (xoops_trim($item->getVar('product_summary')) != '') {
                 $description = $item->getVar('product_summary');
             } else {
                 $description = $item->getVar('product_description');
             }
             $ret[$i]['description'] = $description;
             $ret[$i]['category'] = $this->modname;
             $ret[$i]['domain'] = XOOPS_URL . '/modules/' . $this->dirname . '/';
             $i++;
         }
     }
     return $ret;
 }
开发者ID:osw17,项目名称:oledrion,代码行数:24,代码来源:rssfit.oledrion.php


示例16: foreach

 */
 // On récupère les ID des attributs valorisés
 foreach ($data as $key => $value) {
     $attributesIds[] = oledrion_utils::getId($key);
 }
 if (count($attributesIds) == 0) {
     return _OLEDRION_NA;
 }
 // Puis les attributs
 $attributes = $handlers->h_oledrion_attributes->getItemsFromIds($attributesIds);
 if (count($attributes) == 0) {
     return _OLEDRION_NA;
 }
 // Et on recalcule le prix
 foreach ($attributes as $attribute) {
     $attributeNameInForm = xoops_trim($attribute->getVar('attribute_name') . '_' . $attribute->getVar('attribute_id'));
     if (isset($data[$attributeNameInForm])) {
         $attributeValues = $data[$attributeNameInForm];
         if (is_array($attributeValues)) {
             foreach ($attributeValues as $attributeValue) {
                 $optionName = oledrion_utils::getName($attributeValue);
                 $optionPrice = $attribute->getOptionPriceFromValue($optionName);
                 $productPrice += $optionPrice;
             }
         } else {
             $optionPrice = $attribute->getOptionPriceFromValue(oledrion_utils::getName($attributeValues));
             $productPrice += $optionPrice;
         }
     }
 }
 // Mise en template
开发者ID:osw17,项目名称:oledrion,代码行数:31,代码来源:ajax.php


示例17: xoops_module_update_oledrion

/**
 * oledrion
 *
 * @copyright   The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
 * @author      Hervé Thouzard (http://www.herve-thouzard.com/)
 * @author      Hossein Azizabadi ([email protected])
 * @version     $Id: functions_update.php 12290 2014-02-07 11:05:17Z beckmi $
 */
function xoops_module_update_oledrion($module, $version)
{
    global $xoopsDB;
    // Présence des nouvelles tables et nouvelles zones dans la base de données
    // Nouvelle table oledrion_gateways_options
    $tableName = $xoopsDB->prefix('oledrion_gateways_options');
    if (!oledrion_utils::tableExists($tableName)) {
        $sql = "CREATE TABLE " . $tableName . " (\n                `option_id` int(10) unsigned NOT NULL auto_increment,\n                `option_gateway` varchar(50) NOT NULL COMMENT 'nom de la passerelle de paiement',\n                `option_name` varchar(50) NOT NULL,\n                `option_value` text NOT NULL,\n                PRIMARY KEY  (`option_id`),\n                KEY `option_gateway` (`option_gateway`),\n                KEY `option_name` (`option_name`),\n                KEY `option_gateway_name` (`option_gateway`,`option_name`)\n                ) ENGINE=InnoDB";
        $xoopsDB->queryF($sql);
    }
    // Nouveau champ cmd_comment dans oledrion_commands
    $tableName = $xoopsDB->prefix('oledrion_commands');
    if (!oledrion_utils::fieldExists('cmd_comment', $tableName)) {
        oledrion_utils::addField('`cmd_comment` TEXT NOT NULL', $tableName);
    }
    if (!oledrion_utils::fieldExists('cmd_vat_number', $tableName)) {
        oledrion_utils::addField('`cmd_vat_number` VARCHAR( 255 ) NOT NULL', $tableName);
    }
    /**
     * Nouvelle table oledrion_lists
     * @since 2.2.2009.01.29
     */
    $tableName = $xoopsDB->prefix('oledrion_lists');
    if (!oledrion_utils::tableExists($tableName)) {
        $sql = "CREATE TABLE " . $tableName . " (\n                `list_id` int(10) unsigned NOT NULL auto_increment,\n                `list_uid` mediumint(8) unsigned NOT NULL,\n                `list_title` varchar(255) NOT NULL,\n                `list_date` int(10) unsigned NOT NULL,\n                `list_productscount` mediumint(8) unsigned NOT NULL,\n                `list_views` mediumint(8) unsigned NOT NULL,\n                `list_password` varchar(50) NOT NULL,\n                `list_type` tinyint(3) unsigned NOT NULL,\n                `list_description` text NOT NULL,\n                PRIMARY KEY  (`list_id`),\n                KEY `list_uid` (`list_uid`)\n                ) ENGINE=InnoDB";
        $xoopsDB->queryF($sql);
    }
    /**
     * Nouvelle table oledrion_lists
     * @since 2.2.2009.01.29
     */
    $tableName = $xoopsDB->prefix('oledrion_products_list');
    if (!oledrion_utils::tableExists($tableName)) {
        $sql = "CREATE TABLE " . $tableName . " (\n                `productlist_id` int(10) unsigned NOT NULL auto_increment,\n                `productlist_list_id` int(10) unsigned NOT NULL,\n                `productlist_product_id` int(10) unsigned NOT NULL,\n                PRIMARY KEY  (`productlist_id`),\n                KEY `productlist_list_id` (`productlist_list_id`),\n                KEY `productlist_product_id` (`productlist_product_id`)\n                ) ENGINE=InnoDB";
        $xoopsDB->queryF($sql);
    }
    if (!oledrion_utils::fieldExists('productlist_date', $tableName)) {
        oledrion_utils::addField('productlist_date DATE NOT NULL', $tableName);
    }
    /**
     * Nouvelle table oledrion_attributes
     * @since 2.3.2009.03.09
     */
    $tableName = $xoopsDB->prefix('oledrion_attributes');
    if (!oledrion_utils::tableExists($tableName)) {
        $sql = "CREATE TABLE `{$tableName}` (\n              `attribute_id` int(10) unsigned NOT NULL auto_increment,\n              `attribute_weight` mediumint(7) unsigned default NULL,\n              `attribute_title` varchar(255) default NULL,\n              `attribute_name` varchar(255) NOT NULL,\n              `attribute_type` tinyint(3) unsigned default NULL,\n              `attribute_mandatory` tinyint(1) unsigned default NULL,\n              `attribute_values` text,\n              `attribute_names` text,\n              `attribute_prices` text,\n              `attribute_stocks` text,\n              `attribute_product_id` int(11) unsigned default NULL,\n              `attribute_default_value` varchar(255) default NULL,\n              `attribute_option1` mediumint(7) unsigned default NULL,\n              `attribute_option2` mediumint(7) unsigned default NULL,\n              PRIMARY KEY  (`attribute_id`),\n              KEY `attribute_product_id` (`attribute_product_id`),\n              KEY `attribute_weight` (`attribute_weight`)\n            ) ENGINE=InnoDB;";
        $xoopsDB->queryF($sql);
    }
    /**
     * Nouvelle table oledrion_caddy_attributes
     * @since 2.3.2009.03.10
     */
    $tableName = $xoopsDB->prefix('oledrion_caddy_attributes');
    if (!oledrion_utils::tableExists($tableName)) {
        $sql = "CREATE TABLE `{$tableName}` (\n              `ca_id` int(10) unsigned NOT NULL auto_increment,\n              `ca_cmd_id` int(10) unsigned NOT NULL,\n              `ca_caddy_id` int(10) unsigned NOT NULL,\n              `ca_attribute_id` int(10) unsigned NOT NULL,\n              `ca_attribute_values` text NOT NULL,\n              `ca_attribute_names` text NOT NULL,\n              `ca_attribute_prices` text NOT NULL,\n              PRIMARY KEY  (`ca_id`),\n              KEY `ca_cmd_id` (`ca_cmd_id`),\n              KEY `ca_caddy_id` (`ca_caddy_id`),\n              KEY `ca_attribute_id` (`ca_attribute_id`)\n        ) ENGINE=InnoDB;";
        $xoopsDB->queryF($sql);
    }
    /**
     * Augmentation des types numéraires pour accepter le million
     * @since 2.3.2009.04.20
     */
    $definition = oledrion_utils::getFieldDefinition('product_price', $xoopsDB->prefix('oledrion_products'));
    if ($definition != '') {
        if (xoops_trim($definition['Type']) == 'decimal(7,2)') {
            $tablesToUpdates = array('oledrion_products' => array('product_price', 'product_shipping_price', 'product_discount_price', 'product_ecotaxe'), 'oledrion_caddy' => array('caddy_price'), 'oledrion_commands' => array('cmd_shipping'), 'oledrion_discounts' => array('disc_price_degress_l1total', 'disc_price_degress_l2total', 'disc_price_degress_l3total', 'disc_price_degress_l4total', 'disc_price_degress_l5total'));
            foreach ($tablesToUpdates as $tableName => $fields) {
                foreach ($fields as $field) {
                    $sql = 'ALTER TABLE ' . $xoopsDB->prefix($tableName) . ' CHANGE `' . $field . '` `' . $field . '` DECIMAL( 16, 2 ) NOT NULL';
                    $xoopsDB->queryF($sql);
                }
            }
        }
    }
    /**
     * Add product_property
     * @since 2.3.2012.08.03
     */
    $tableName = $xoopsDB->prefix('oledrion_products');
    if (!oledrion_utils::fieldExists('product_property1', $tableName)) {
        oledrion_utils::addField('`product_property1` varchar(255) NOT NULL', $tableName);
    }
    if (!oledrion_utils::fieldExists('product_property2', $tableName)) {
        oledrion_utils::addField('`product_property2` varchar(255) NOT NULL', $tableName);
    }
    if (!oledrion_utils::fieldExists('product_property3', $tableName)) {
        oledrion_utils::addField('`product_property3` varchar(255) NOT NULL', $tableName);
    }
    if (!oledrion_utils::fieldExists('product_property4', $tableName)) {
        oledrion_utils::addField('`product_property4` varchar(255) NOT NULL', $tableName);
    }
    if (!oledrion_utils::fieldExists('product_property5', $tableName)) {
//.........这里部分代码省略.........
开发者ID:osw17,项目名称:oledrion,代码行数:101,代码来源:functions_update.php


示例18: ForumPosts

             exit;
         }
     }
     $forumpost = new ForumPosts();
     $forumpost->setForum($forum);
     if (isset($pid) && $pid != "") {
         $forumpost->setParent($pid);
     }
     if (!empty($topic_id)) {
         $forumpost->setTopicId($topic_id);
         $isreply = 1;
     }
     $forumpost->setIp($HTTP_SERVER_VARS['REMOTE_ADDR']);
     $forumpost->setUid($uid);
 }
 $subject = xoops_trim($HTTP_POST_VARS['subject']);
 $subject = $subject == '' ? _NOTITLE : $subject;
 $forumpost->setSubject($subject);
 $forumpost->setText($HTTP_POST_VARS['message']);
 $forumpost->setNohtml($HTTP_POST_VARS['nohtml']);
 $forumpost->setNosmiley($HTTP_POST_VARS['nosmiley']);
 $forumpost->setIcon($HTTP_POST_VARS['icon']);
 $forumpost->setAttachsig($HTTP_POST_VARS['attachsig']);
 if (!($postid = $forumpost->store())) {
     include_once XOOPS_ROOT_PATH . '/header.php';
     xoops_error('Could not insert forum post');
     include_once XOOPS_ROOT_PATH . '/footer.php';
     exit;
 }
 if (is_object($xoopsUser) && !empty($isnew)) {
     $xoopsUser->incrementPost();
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:post.php


示例19: xoops_cp_header

     // Duplication d'une réduction
     // ****************************************************************************************************************
     xoops_cp_header();
     $id = isset($_GET['id']) ? intval($_GET['id']) : 0;
     if (empty($id)) {
         oledrion_utils::redirect(_AM_OLEDRION_ERROR_1, $baseurl, 5);
     }
     $opRedirect = 'discounts';
     $item = null;
     $item = $h_oledrion_discounts->get($id);
     if (is_object($item)) {
         $newDiscount = $item->xoopsClone();
         if (OLEDRION_DUPLICATED_PLACE == 'right') {
             $newDiscount->setVar('disc_title', xoops_trim($item->getvar('disc_title')) . ' ' . _AM_OLEDRION_DUPLICATED);
         } else {
             $newDiscount->setVar('disc_title', _AM_OLEDRION_DUPLICATED . ' ' . xoops_trim($item->getvar('disc_title')));
         }
         $newDiscount->setVar('disc_id', 0);
         $newDiscount->setNew();
         $res = $h_oledrion_discounts->insert($newDiscount, true);
         if ($res) {
             oledrion_utils::updateCache();
             oledrion_utils::redirect(_AM_OLEDRION_SAVE_OK, $baseurl . '?op=' . $opRedirect, 2);
         } else {
             oledrion_utils::redirect(_AM_OLEDRION_SAVE_PB, $baseurl . '?op=' . $opRedirect, 5);
         }
     } else {
         oledrion_utils::redirect(_AM_OLEDRION_NOT_FOUND, $baseurl . '?op=' . $opRedirect, 5);
     }
     // ****************************************************************************************************************
 // ****************************************************************************************************************
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:discounts.php


示例20: implode

$uid_ids = $article->getWhosWho(news_getmoduleoption('restrictindex'));
if (count($uid_ids) > 0) {
    $lst_uid = implode(',', $uid_ids);
    $member_handler =& xoops_gethandler('member');
    $critere = new Criteria('uid', '(' . $lst_uid . ')', 'IN');
    $tbl_users = $member_handler->getUsers($critere);
    foreach ($tbl_users as $one_user) {
        $uname = '';
        switch ($option) {
            case 1:
                // Username
                $uname = $one_user->getVar('uname');
                break;
            case 2:
                // Display full name (if it is not empty)
                if (xoops_trim($one_user->getVar('name')) != '') {
                    $uname = $one_user->getVar('name');
                } else {
                    $uname = $one_user->getVar('uname');
                }
                break;
        }
        $xoopsTpl->append('whoswho', array('uid' => $one_user->getVar('uid'), 'name' => $uname, 'user_avatarurl' => XOOPS_URL . '/uploads/' . $one_user->getVar('user_avatar')));
    }
}
$xoopsTpl->assign('advertisement', news_getmoduleoption('advertisement'));
/**
 * Manage all the meta datas
 */
news_CreateMetaDatas($article);
$xoopsTpl->assign('xoops_pagetitle', _AM_NEWS_WHOS_WHO);
开发者ID:trabisdementia,项目名称:xuups,代码行数:31,代码来源:whoswho.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP xoops_utf8_encode函数代码示例发布时间:2022-05-23
下一篇:
PHP xoops_template_touch函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap