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


PHP Csrf::param方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  * @access  public
  * @return  shopmanager
  */
 function __construct()
 {
     global $_ARRAYLANG, $objTemplate;
     \Cx\Core\Setting\Controller\Setting::init('Shop', 'config');
     $this->checkProfileAttributes();
     $cx = \Cx\Core\Core\Controller\Cx::instanciate();
     self::$defaultImage = file_exists($cx->getWebsiteImagesShopPath() . '/' . ShopLibrary::noPictureName) ? $cx->getWebsiteImagesShopWebPath() . '/' . ShopLibrary::noPictureName : $cx->getCodeBaseOffsetPath() . '/images/Shop/' . ShopLibrary::noPictureName;
     self::$objTemplate = new \Cx\Core\Html\Sigma($cx->getCodeBaseModulePath() . '/Shop/View/Template/Backend');
     self::$objTemplate->setErrorHandling(PEAR_ERROR_DIE);
     //DBG::log("ARRAYLANG: ".var_export($_ARRAYLANG, true));
     self::$objTemplate->setGlobalVariable($_ARRAYLANG + array('SHOP_CURRENCY' => Currency::getActiveCurrencySymbol(), 'CSRF_PARAM' => \Cx\Core\Csrf\Controller\Csrf::param()));
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:17,代码来源:ShopManager.class.php

示例2: __construct

 /**
  * PHP5 constructor
  * @global \Cx\Core\Html\Sigma
  * @global array
  * @global array
  */
 function __construct()
 {
     global $objTemplate, $_ARRAYLANG, $_CONFIG;
     $this->em = \Env::get('em');
     $this->_objTpl = new \Cx\Core\Html\Sigma(\Env::get('cx')->getCodeBaseCoreModulePath() . '/Contact/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->_objTpl->setGlobalVariable('CSRF_PARAM', \Cx\Core\Csrf\Controller\Csrf::param());
     $this->_arrFormFieldTypes = array('text' => $_ARRAYLANG['TXT_CONTACT_TEXTBOX'], 'label' => $_ARRAYLANG['TXT_CONTACT_TEXT'], 'checkbox' => $_ARRAYLANG['TXT_CONTACT_CHECKBOX'], 'checkboxGroup' => $_ARRAYLANG['TXT_CONTACT_CHECKBOX_GROUP'], 'country' => $_ARRAYLANG['TXT_CONTACT_COUNTRY'], 'date' => $_ARRAYLANG['TXT_CONTACT_DATE'], 'datetime' => $_ARRAYLANG['TXT_CONTACT_DATETIME'], 'file' => $_ARRAYLANG['TXT_CONTACT_FILE_UPLOAD_SINGLE'], 'multi_file' => $_ARRAYLANG['TXT_CONTACT_FILE_UPLOAD_MULTI'], 'fieldset' => $_ARRAYLANG['TXT_CONTACT_FIELDSET'], 'hidden' => $_ARRAYLANG['TXT_CONTACT_HIDDEN_FIELD'], 'horizontalLine' => $_ARRAYLANG['TXT_CONTACT_HORIZONTAL_LINE'], 'password' => $_ARRAYLANG['TXT_CONTACT_PASSWORD_FIELD'], 'radio' => $_ARRAYLANG['TXT_CONTACT_RADIO_BOXES'], 'select' => $_ARRAYLANG['TXT_CONTACT_SELECTBOX'], 'textarea' => $_ARRAYLANG['TXT_CONTACT_TEXTAREA'], 'recipient' => $_ARRAYLANG['TXT_CONTACT_RECEIVER_ADDRESSES_SELECTION']);
     $objUserAttribute = \FWUser::getFWUserObject()->objUser->objAttribute;
     $this->_arrUserAccountData = array('access_email' => $_ARRAYLANG['TXT_CONTACT_EMAIL'], 'access_gender' => contrexx_raw2xhtml($objUserAttribute->getById('gender')->getName()), 'access_title' => contrexx_raw2xhtml($objUserAttribute->getById('title')->getName()), 'access_firstname' => contrexx_raw2xhtml($objUserAttribute->getById('firstname')->getName()), 'access_lastname' => contrexx_raw2xhtml($objUserAttribute->getById('lastname')->getName()), 'access_company' => contrexx_raw2xhtml($objUserAttribute->getById('company')->getName()), 'access_address' => contrexx_raw2xhtml($objUserAttribute->getById('address')->getName()), 'access_city' => contrexx_raw2xhtml($objUserAttribute->getById('city')->getName()), 'access_zip' => contrexx_raw2xhtml($objUserAttribute->getById('zip')->getName()), 'access_country' => contrexx_raw2xhtml($objUserAttribute->getById('country')->getName()), 'access_phone_office' => contrexx_raw2xhtml($objUserAttribute->getById('phone_office')->getName()), 'access_phone_private' => contrexx_raw2xhtml($objUserAttribute->getById('phone_private')->getName()), 'access_phone_mobile' => contrexx_raw2xhtml($objUserAttribute->getById('phone_mobile')->getName()), 'access_phone_fax' => contrexx_raw2xhtml($objUserAttribute->getById('phone_fax')->getName()), 'access_birthday' => contrexx_raw2xhtml($objUserAttribute->getById('birthday')->getName()), 'access_website' => contrexx_raw2xhtml($objUserAttribute->getById('website')->getName()), 'access_profession' => contrexx_raw2xhtml($objUserAttribute->getById('profession')->getName()), 'access_interests' => contrexx_raw2xhtml($objUserAttribute->getById('interests')->getName()), 'access_signature' => contrexx_raw2xhtml($objUserAttribute->getById('signature')->getName()));
     $this->initContactForms();
     $this->initCheckTypes();
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:20,代码来源:ContactManager.class.php

示例3: JSedituser

    function JSedituser()
    {
        global $_ARRAYLANG;
        \JS::registerCode('
function DeleteUser(UserID, email) {
  strConfirmMsg = "' . $_ARRAYLANG['TXT_NEWSLETTER_CONFIRM_DELETE_RECIPIENT_OF_ADDRESS'] . '";
  if (confirm(strConfirmMsg.replace("%s", email)+"\\n' . $_ARRAYLANG['TXT_NEWSLETTER_CANNOT_UNDO_OPERATION'] . '")) {
    document.location.href = "index.php?cmd=Newsletter&' . \Cx\Core\Csrf\Controller\Csrf::param() . '&act=users&delete=1&id="+UserID;
  }
}

function MultiAction() {
  with (document.userlist) {
    switch (userlist_MultiAction.value) {
      case "delete":
        if (confirm(\'' . $_ARRAYLANG['TXT_NEWSLETTER_CONFIRM_DELETE_SELECTED_RECIPIENTS'] . '\\n' . $_ARRAYLANG['TXT_NEWSLETTER_CANNOT_UNDO_OPERATION'] . '\')) {
          submit();
        }
        break;
    }
  }
}
');
    }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:24,代码来源:NewsletterManager.class.php

示例4: image

 /**
  * Shows the image settings page
  *
  * @access  public
  *
  * @param $arrData
  *
  * @throws \Exception
  * @return  boolean  true on success, false otherwise
  */
 public function image($arrData)
 {
     \JS::registerCSS(substr(ASCMS_CORE_MODULE_FOLDER . '/MediaBrowser/View/Style/mediabrowser.css', 1));
     global $objDatabase, $objTemplate, $_ARRAYLANG;
     $this->strPageTitle = $_ARRAYLANG['TXT_SETTINGS_IMAGE'];
     $objTemplate->addBlockfile('ADMIN_CONTENT', 'settings_image', 'settings_image.html');
     \ContrexxJavascript::getInstance()->setVariable(array('publicTempPath' => Cx::instanciate()->getWebsitePublicTempWebPath()), 'config/image');
     // Saves the settings
     if (isset($arrData['submit'])) {
         $arrSettings['image_cut_width'] = contrexx_input2db(intval($arrData['image_cut_width']));
         $arrSettings['image_cut_height'] = contrexx_input2db(intval($arrData['image_cut_height']));
         //$arrSettings['image_scale_width']  = contrexx_input2db(intval($arrData['image_scale_width']));
         //$arrSettings['image_scale_height'] = contrexx_input2db(intval($arrData['image_scale_height']));
         $arrSettings['image_compression'] = contrexx_input2db(intval($arrData['image_compression']));
         foreach ($arrSettings as $name => $value) {
             $query = '
                 UPDATE `' . DBPREFIX . 'settings_image`
                 SET `value` = "' . $value . '"
                 WHERE `name` = "' . $name . '"
             ';
             $objResult = $objDatabase->Execute($query);
             if ($objResult === false) {
                 throw new \Exception('Could not update the settings');
             }
         }
         $this->strOkMessage = $_ARRAYLANG['TXT_SETTINGS_UPDATED'];
     }
     /**
      * @var $cx \Cx\Core\Core\Controller\Cx
      */
     $cx = \Env::get('cx');
     $pdo = $cx->getDb()->getPdoConnection();
     $sth = $pdo->query('SELECT id, name, size FROM  `' . DBPREFIX . 'settings_thumbnail`');
     $thumbnails = $sth->fetchAll();
     $newThumbnailTemplate = new \Cx\Core\Html\Sigma($cx->getCodeBasePath());
     $newThumbnailTemplate->loadTemplateFile($cx->getCodeBaseCorePath() . '/Config/View/Template/Backend/settings_image_edit.html');
     $newThumbnailTemplate->removeUnknownVariables = false;
     $newThumbnailTemplate->setVariable(array('TXT_IMAGE_TITLE' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_TITLE'], 'TXT_IMAGE_CSRF' => \Cx\Core\Csrf\Controller\Csrf::param(), 'TXT_IMAGE_THUMBNAILS_DELETE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_DELETE'], 'TXT_IMAGE_CUT_WIDTH' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_CUT_WIDTH'], 'TXT_IMAGE_CUT_HEIGHT' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_CUT_HEIGHT'], 'TXT_IMAGE_THUMBNAILS' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS'], 'TXT_IMAGE_COMPRESSION' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_COMPRESSION'], 'TXT_SAVE' => $_ARRAYLANG['TXT_SAVE'], 'TXT_IMAGE_THUMBNAILS_ID' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_ID'], 'TXT_IMAGE_THUMBNAILS_NAME' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_NAME'], 'TXT_IMAGE_THUMBNAILS_SIZE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_SIZE'], 'TXT_SETTINGS_FUNCTIONS' => $_ARRAYLANG['TXT_SETTINGS_FUNCTIONS'], 'TXT_IMAGE_THUMBNAILS_RELOAD' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_RELOAD'], 'TXT_IMAGE_THUMBNAILS_NEW' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_NEW'], 'TXT_IMAGE_THUMBNAILS_MAX_SIZE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_MAX_SIZE'], 'SETTINGS_IMAGE_CUT_WIDTH' => !empty($arrSettings['image_cut_width']) ? $arrSettings['image_cut_width'] : 0, 'SETTINGS_IMAGE_CUT_HEIGHT' => !empty($arrSettings['image_cut_height']) ? $arrSettings['image_cut_height'] : 0));
     $objTemplate->setVariable('CONFIG_THUMBNAIL_NEW_TEMPLATE', implode(' ', explode("\n", str_replace("'", "\"", $newThumbnailTemplate->get()))));
     foreach ($thumbnails as $thumbnail) {
         $objTemplate->setVariable(array('IMAGE_THUMBNAIL_ID' => $thumbnail['id'], 'IMAGE_THUMBNAIL_NAME' => $thumbnail['name'], 'IMAGE_THUMBNAIL_SIZE' => $thumbnail['size'], 'TXT_IMAGE_THUMBNAILS_MAXIMUM' => sprintf($_ARRAYLANG['TXT_IMAGE_THUMBNAILS_MAXIMUM'], $thumbnail['size'] . 'px')));
         $objTemplate->parse('settings_image_thumbnails_list');
     }
     // Gets the settings
     $query = '
         SELECT `name`, `value`
         FROM `' . DBPREFIX . 'settings_image`
     ';
     $objResult = $objDatabase->Execute($query);
     if ($objResult !== false) {
         $arrSettings = array();
         while (!$objResult->EOF) {
             // Creates the settings array
             $arrSettings[$objResult->fields['name']] = $objResult->fields['value'];
             $objResult->MoveNext();
         }
     } else {
         throw new \Exception('Could not query the settings.');
     }
     // Defines the compression values
     $arrCompressionOptions = array();
     for ($i = 1; $i <= 20; $i++) {
         $arrCompressionOptions[] = $i * 5;
     }
     // Parses the compression options
     $imageCompression = !empty($arrSettings['image_compression']) ? intval($arrSettings['image_compression']) : 95;
     foreach ($arrCompressionOptions as $compression) {
         $objTemplate->setVariable(array('IMAGE_COMPRESSION_VALUE' => $compression, 'IMAGE_COMPRESSION_NAME' => $compression, 'OPTION_SELECTED' => $compression == $imageCompression ? 'selected="selected"' : ''));
         $objTemplate->parse('settings_image_compression_options');
     }
     // Parses the settings
     $objTemplate->setVariable(array('TXT_IMAGE_TITLE' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_TITLE'], 'TXT_IMAGE_CSRF' => \Cx\Core\Csrf\Controller\Csrf::param(), 'TXT_IMAGE_THUMBNAILS_DELETE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_DELETE'], 'TXT_IMAGE_CUT_WIDTH' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_CUT_WIDTH'], 'TXT_IMAGE_CUT_HEIGHT' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_CUT_HEIGHT'], 'TXT_IMAGE_THUMBNAILS' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS'], 'TXT_IMAGE_COMPRESSION' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_COMPRESSION'], 'TXT_SAVE' => $_ARRAYLANG['TXT_SAVE'], 'TXT_IMAGE_THUMBNAILS_ID' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_ID'], 'TXT_IMAGE_THUMBNAILS_NAME' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_NAME'], 'TXT_IMAGE_THUMBNAILS_SIZE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_SIZE'], 'TXT_SETTINGS_FUNCTIONS' => $_ARRAYLANG['TXT_SETTINGS_FUNCTIONS'], 'TXT_IMAGE_THUMBNAILS_RELOAD' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_RELOAD'], 'TXT_IMAGE_THUMBNAILS_NEW' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_NEW'], 'TXT_IMAGE_THUMBNAILS_MAX_SIZE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_MAX_SIZE'], 'SETTINGS_IMAGE_CUT_WIDTH' => !empty($arrSettings['image_cut_width']) ? $arrSettings['image_cut_width'] : 0, 'SETTINGS_IMAGE_CUT_HEIGHT' => !empty($arrSettings['image_cut_height']) ? $arrSettings['image_cut_height'] : 0));
     $objTemplate->parse('settings_image');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($objTemplate);
     return true;
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:86,代码来源:Config.class.php

示例5: getHomePage

 function getHomePage()
 {
     global $_CORELANG, $_CONFIG, $objTemplate, $objDatabase;
     $objTemplate->addBlockfile('ADMIN_CONTENT', 'content', 'index_home.html');
     \JS::activate('jquery-bootstrap');
     \JS::activate('jquery-jqplot');
     $arrAccessIDs = array(5, 10, 76, '84_1', 6, 19, 75, '84_2', 17, 18, 7, 32, 21);
     foreach ($arrAccessIDs as $id) {
         $accessID = strpos($id, '_') ? substr($id, 0, strpos($id, '_')) : $id;
         if (\Permission::checkAccess($accessID, 'static', true)) {
             $objTemplate->touchBlock('check_access_' . $id);
         } else {
             $objTemplate->hideBlock('check_access_' . $id);
         }
     }
     $objTemplate->setVariable(array('CSRF' => \Cx\Core\Csrf\Controller\Csrf::param(), 'TXT_LAST_LOGIN' => htmlentities($_CORELANG['TXT_LAST_LOGIN'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_CONTREXX_NEWS' => htmlentities($_CORELANG['TXT_CONTREXX_NEWS'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_CREATING_AND_PUBLISHING' => htmlentities($_CORELANG['TXT_CREATING_AND_PUBLISHING'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_EVALUATE_AND_VIEW' => htmlentities($_CORELANG['TXT_EVALUATE_AND_VIEW'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_MANAGE' => htmlentities($_CORELANG['TXT_MANAGE'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_NEW_SITE' => htmlentities($_CORELANG['TXT_NEW_PAGE'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_ADD_NEWS' => htmlentities($_CORELANG['TXT_ADD_NEWS'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_ADD_BLOCK' => htmlentities($_CORELANG['TXT_ADD_BLOCK'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_ADD_FORM' => htmlentities($_CORELANG['TXT_ADD_FORM'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_CONTENT_MANAGER' => htmlentities($_CORELANG['TXT_CONTENT_MANAGER'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_STATS' => htmlentities($_CORELANG['TXT_STATS'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_WORKFLOW' => htmlentities($_CORELANG['TXT_WORKFLOW'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_FORMS' => htmlentities($_CORELANG['TXT_FORMS'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_SYSTEM_SETTINGS' => htmlentities($_CORELANG['TXT_SYSTEM_SETTINGS'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_USER_MANAGER' => htmlentities($_CORELANG['TXT_USER_ADMINISTRATION'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_MEDIA_MANAGER' => htmlentities($_CORELANG['TXT_MEDIA_MANAGER'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_IMAGE_ADMINISTRATION' => htmlentities($_CORELANG['TXT_IMAGE_ADMINISTRATION'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_SKINS' => htmlentities($_CORELANG['TXT_DESIGN_MANAGEMENT'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_VISITORS' => htmlentities($_CORELANG['TXT_CORE_VISITORS'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_REQUESTS' => htmlentities($_CORELANG['TXT_CORE_REQUESTS'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_DASHBOARD_NEWS_ALERT' => htmlentities($_CORELANG['TXT_DASHBOARD_NEWS_ALERT'], ENT_QUOTES, CONTREXX_CHARSET), 'TXT_DASHBOARD_STATS_ALERT' => htmlentities($_CORELANG['TXT_DASHBOARD_STATS_ALERT'], ENT_QUOTES, CONTREXX_CHARSET)));
     $objTemplate->setGlobalVariable('TXT_LOGOUT', $_CORELANG['TXT_LOGOUT']);
     if (\Permission::checkAccess(17, 'static', true)) {
         $objTemplate->touchBlock('news_delete');
         $objTemplate->touchBlock('stats_delete');
     } else {
         $objTemplate->hideBlock('news_delete');
         $objTemplate->hideBlock('stats_delete');
     }
     $license = \Cx\Core_Modules\License\License::getCached($_CONFIG, $objDatabase);
     $message = $license->getMessage(true, \FWLanguage::getLanguageCodeById(BACKEND_LANG_ID), $_CORELANG);
     if ($message instanceof \Cx\Core_Modules\License\Message && strlen($message->getText()) && $message->showInDashboard()) {
         $licenseManager = new \Cx\Core_Modules\License\LicenseManager('', null, $_CORELANG, $_CONFIG, $objDatabase);
         $objTemplate->setVariable('MESSAGE_TITLE', contrexx_raw2xhtml($licenseManager->getReplacedMessageText($message)));
         $licenseType = $message->getType();
         switch ($licenseType) {
             case '--this case is not defined by license --':
                 $bsCalloutType = 'danger';
                 break;
             case 'alertbox':
                 $bsCalloutType = 'warning';
                 break;
             case 'okbox':
             default:
                 $bsCalloutType = 'info';
                 break;
         }
         $objTemplate->setVariable('MESSAGE_TYPE', $bsCalloutType);
         $objTemplate->setVariable('MESSAGE_LINK', contrexx_raw2xhtml($message->getLink()));
         $objTemplate->setVariable('MESSAGE_LINK_TARGET', contrexx_raw2xhtml($message->getLinkTarget()));
     }
     // TODO: Unused
     //        $objFWUser = \FWUser::getFWUserObject();
     $objResult = $objDatabase->SelectLimit('SELECT `logs`.`datetime`, `users`.`username`
         FROM `' . DBPREFIX . 'log` AS `logs`
         LEFT JOIN `' . DBPREFIX . 'access_users` AS `users`
         ON `users`.`id`=`logs`.`userid`
         ORDER BY `logs`.`id` DESC', 1);
     if ($objResult && $objResult->RecordCount() > 0) {
         $objTemplate->setVariable(array('LAST_LOGIN_USERNAME' => contrexx_raw2xhtml($objResult->fields['username']), 'LAST_LOGIN_TIME' => date('d.m.Y', strtotime($objResult->fields['datetime']))));
         $objTemplate->parse('last_login');
     } else {
         $objTemplate->setVariable('LOG_ERROR_MESSAGE', $_CORELANG['TXT_NO_DATA_FOUND']);
     }
     if ($_CONFIG['dashboardStatistics'] == 'on') {
         $arrStatistics = $this->getStatistics();
         $objTemplate->setVariable(array('STATS_TITLE' => $_CORELANG['TXT_CORE_STATS_FROM'] . ' ' . reset($arrStatistics['dates']) . ' - ' . end($arrStatistics['dates']), 'STATS_TICKS' => json_encode($arrStatistics['ticks']), 'STATS_DATES' => json_encode($arrStatistics['dates']), 'STATS_VISITORS' => json_encode($arrStatistics['visitors']), 'STATS_REQUESTS' => json_encode($arrStatistics['requests']), 'STATS_TOTAL_VISITORS' => array_sum($arrStatistics['visitors']), 'STATS_TOTAL_REQUESTS' => array_sum($arrStatistics['requests'])));
     } else {
         $objTemplate->hideBlock('stats');
         $objTemplate->hideBlock('stats_javascript');
     }
     $arrItems = null;
     // This index may be unset
     if (!empty($_CONFIG['dashboardNewsSrc'])) {
         $objRss = new \XML_RSS($_CONFIG['dashboardNewsSrc'] . '?version=' . $_CONFIG['coreCmsVersion']);
         $objRss->parse();
         $arrItems = $objRss->getItems();
     }
     if (!empty($arrItems) && $_CONFIG['dashboardNews'] == 'on') {
         if (empty($arrItems[0]['description'])) {
             $objTemplate->setVariable(array('NEWS_CONTENT' => $arrItems[0]['title'], 'NEWS_LINK' => $arrItems[0]['link']));
             $objTemplate->hideBlock('news_title');
         } else {
             $objTemplate->setVariable(array('NEWS_TITLE' => $arrItems[0]['title'], 'NEWS_CONTENT' => $arrItems[0]['description'], 'NEWS_LINK' => $arrItems[0]['link']));
         }
         $objTemplate->parse('news');
     } else {
         $objTemplate->hideBlock('news');
     }
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:85,代码来源:Home.class.php

示例6: editTaskType

 /**
  * Edit the task type
  *
  * @global array $_ARRAYLANG
  * @global object $objDatabase
  * @return true
  */
 function editTaskType()
 {
     global $objDatabase, $_ARRAYLANG;
     \JS::activate("jquery");
     // Activate validation scripts
     \JS::registerCSS("lib/javascript/validationEngine/css/validationEngine.jquery.css");
     \JS::registerJS("lib/javascript/validationEngine/js/languages/jquery.validationEngine-en.js");
     \JS::registerJS("lib/javascript/validationEngine/js/jquery.validationEngine.js");
     \JS::registerCSS("lib/javascript/chosen/chosen.css");
     \JS::registerJS("lib/javascript/chosen/chosen.jquery.js");
     $id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
     if ($_POST['saveTaskType']) {
         $this->saveTaskTypes($id);
         $msg = "taskUpdated";
         \Cx\Core\Csrf\Controller\Csrf::header("Location:./index.php?cmd=" . $this->moduleName . "&act=settings&tpl=tasktypes&msg=" . base64_encode($msg));
         exit;
     }
     $objTpl = $this->_objTpl;
     $this->_pageTitle = $_ARRAYLANG['TXT_CRM_EDIT_TASK_TYPE'];
     $objTpl->addBlockfile('CRM_SETTINGS_FILE', 'settings_block', "module_{$this->moduleNameLC}_settings_edit_task_types.html");
     $this->getModifyTaskTypes($id);
     $objTpl->setVariable(array('TXT_CRM_ADD_TASK_TYPE' => $_ARRAYLANG['TXT_CRM_EDIT_TASK_TYPE'], 'TXT_CRM_BACK1' => $_ARRAYLANG['TXT_CRM_BACK1'], 'CSRF_PARAM' => \Cx\Core\Csrf\Controller\Csrf::param(), 'TXT_BROWSE' => $_ARRAYLANG['TXT_BROWSE'], 'TXT_CRM_MANDATORY_FIELDS_NOT_FILLED_OUT' => $_ARRAYLANG['TXT_CRM_MANDATORY_FIELDS_NOT_FILLED_OUT']));
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:30,代码来源:CrmSettings.class.php

示例7: showMedium

    function showMedium($blockFirst = false)
    {
        global $_ARRAYLANG, $_CONFIG, $_LANGID;
        $categoryId = isset($_REQUEST['cid']) ? intval($_REQUEST['cid']) == 0 ? false : intval($_REQUEST['cid']) : false;
        $mediumId = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
        if ($mediumId > 0) {
            $this->_updateViews($mediumId);
        }
        $this->_objTpl->setGlobalVariable(array('TXT_PODCAST_PLAY' => $_ARRAYLANG['TXT_PODCAST_PLAY'], 'TXT_PODCAST_MEDIA_VIEWS' => $_ARRAYLANG['TXT_PODCAST_MEDIA_VIEWS']));
        $maxSize = $this->_arrSettings['thumb_max_size'];
        $tmpOnload = $blockFirst ? 'try{tmp();}catch(e){}' : '';
        $embedCode = <<<EOF
<script type="text/javascript">
//<![CDATA[
    var thumbSizeMax = {$maxSize};
    var previewSizeMax = 180;

    tmp = window.onload;
    if(tmp == null){
        tmp = function(){};
    }
    window.onload = function(){
        try{
            elPodcastContainer = document.getElementById("podcast_container");
            elPodcastContainerLength = elPodcastContainer.childNodes.length;
            document.getElementById("podcast_container").innerHTML += '%s';
            for (childNr = elPodcastContainerLength - 1; childNr >= 0; childNr--) {
                elPodcastContainer.removeChild(elPodcastContainer.childNodes[childNr]);
            }

        }catch(e){}
        setSize(document.getElementById("podcast_preview"), previewSizeMax);
        mThumbnails = document.getElementsByName("podcast_thumbnails");
        for(i=0;i<mThumbnails.length;i++){
            setSize(mThumbnails[i], thumbSizeMax);
        }
        {$tmpOnload}
    }

//]]>
</script>
EOF;
        if (($arrMedium =& $this->_getMedium($mediumId, true)) !== false) {
            if ($this->_objTpl->blockExists('podcast_medium')) {
                $arrTemplate =& $this->_getTemplate($arrMedium['template_id']);
                $mediumCode = sprintf($embedCode, addcslashes($this->_getHtmlTag($arrMedium, $arrTemplate['template']), "\r\n'"));
                $this->_objTpl->setVariable(array('PODCAST_MEDIUM_ID' => $mediumId, 'PODCAST_MEDIUM_CATEGORY_ID' => $categoryId, 'PODCAST_MEDIUM_TITLE' => htmlentities($arrMedium['title'], ENT_QUOTES, CONTREXX_CHARSET), 'PODCAST_MEDIUM_AUTHOR' => empty($arrMedium['author']) ? '-' : htmlentities($arrMedium['author'], ENT_QUOTES, CONTREXX_CHARSET), 'PODCAST_MEDIUM_DESCRIPTION' => htmlentities($arrMedium['description'], ENT_QUOTES, CONTREXX_CHARSET), 'PODCAST_MEDIUM_CODE' => $mediumCode, 'PODCAST_MEDIUM_DATE' => date(ASCMS_DATE_FORMAT, $arrMedium['date_added']), 'PODCAST_MEDIUM_SHORT_DATE' => date(ASCMS_DATE_FORMAT_DATE, $arrMedium['date_added']), 'PODCAST_MEDIUM_THUMBNAIL' => htmlentities($arrMedium['thumbnail'], ENT_QUOTES, CONTREXX_CHARSET), 'PODCAST_MEDIUM_URL' => htmlentities($arrMedium['source'], ENT_QUOTES, CONTREXX_CHARSET), 'PODCAST_MEDIUM_PLAYLENGHT' => $this->_getPlaylengthFormatOfTimestamp($arrMedium['playlength']), 'PODCAST_MEDIUM_PLAYLENGTH' => $this->_getPlaylengthFormatOfTimestamp($arrMedium['playlength']), 'PODCAST_MEDIUM_VIEWS' => $this->_getViews($mediumId), 'PODCAST_MEDIUM_FILESIZE' => $this->_formatFileSize($arrMedium['size'])));
                $this->_objTpl->parse('podcast_medium');
            }
            if ($this->_objTpl->blockExists('podcast_no_medium')) {
                $this->_objTpl->hideBlock('podcast_no_medium');
            }
        } else {
            $podcastJavascript = sprintf($embedCode, '');
            if ($this->_objTpl->blockExists('podcast_no_medium')) {
                $this->_objTpl->touchBlock('podcast_no_medium');
            }
            if ($this->_objTpl->blockExists('podcast_medium')) {
                $this->_objTpl->hideBlock('podcast_medium');
            }
        }
        $menu = $this->_getCategoriesMenu($categoryId, 'id="podcast_category_menu"', true, true);
        if ($menu !== false) {
            $this->_objTpl->setVariable('PODCAST_CATEGORY_MENU', $menu . ' <input type="button" onclick="window.location.href=\'index.php?section=Podcast&amp;' . \Cx\Core\Csrf\Controller\Csrf::param() . '&amp;cid=\'+document.getElementById(\'podcast_category_menu\').value" value="' . $_ARRAYLANG['TXT_PODCAST_SHOW'] . '" />');
        }
        if (intval($categoryId) == 0) {
            $categories = array_keys($this->_getCategories(true, false, $_LANGID));
        } else {
            $categories = $categoryId;
        }
        if ($this->_objTpl->blockExists('podcast_media')) {
            $pos = isset($_GET['pos']) ? intval($_GET['pos']) : 0;
            $arrMedia =& $this->_getMedia($categories, true, $_CONFIG['corePagingLimit'], $pos);
            if (count($arrMedia) > 0) {
                foreach ($arrMedia as $mediumId => $arrMedium) {
                    $this->_objTpl->setVariable(array('PODCAST_MEDIUM_ROW' => $i % 2 == 0 ? 'row1' : 'row2', 'PODCAST_MEDIA_ID' => $mediumId, 'PODCAST_MEDIA_CATEGORY_ID' => $categoryId, 'PODCAST_MEDIA_TITLE' => htmlentities($arrMedium['title'], ENT_QUOTES, CONTREXX_CHARSET), 'PODCAST_MEDIA_AUTHOR' => htmlentities($arrMedium['author'], ENT_QUOTES, CONTREXX_CHARSET), 'PODCAST_MEDIA_DESCRIPTION' => empty($arrMedium['description']) ? '-' : htmlentities($arrMedium['description'], ENT_QUOTES, CONTREXX_CHARSET), 'PODCAST_MEDIA_DATE' => date(ASCMS_DATE_FORMAT, $arrMedium['date_added']), 'PODCAST_MEDIA_SHORT_DATE' => date(ASCMS_DATE_FORMAT_DATE, $arrMedium['date_added']), 'PODCAST_MEDIA_URL' => htmlentities($arrMedium['source'], ENT_QUOTES, CONTREXX_CHARSET), 'PODCAST_MEDIA_THUMBNAIL' => htmlentities($arrMedium['thumbnail'], ENT_QUOTES, CONTREXX_CHARSET), 'PODCAST_MEDIA_VIEWS' => $this->_getViews($mediumId), 'PODCAST_MEDIA_PLAYLENGHT' => $this->_getPlaylengthFormatOfTimestamp($arrMedium['playlength']), 'PODCAST_MEDIA_PLAYLENGTH' => $this->_getPlaylengthFormatOfTimestamp($arrMedium['playlength']), 'PODCAST_MEDIA_SHORT_PLAYLENGHT' => $this->_getShortPlaylengthFormatOfTimestamp($arrMedium['playlength']), 'PODCAST_MEDIA_SHORT_PLAYLENGTH' => $this->_getShortPlaylengthFormatOfTimestamp($arrMedium['playlength'])));
                    $i++;
                    $this->_objTpl->parse('podcast_media');
                }
            }
            $mediaCount =& $this->_getMediaCount($categoryId, true);
            if ($mediaCount > $_CONFIG['corePagingLimit']) {
                $paging = getPaging($mediaCount, $pos, '&section=Podcast&cid=' . $categoryId, $_ARRAYLANG['TXT_PODCAST_MEDIA']);
                $this->_objTpl->setVariable('PODCAST_PAGING', $paging);
            }
        }
        $setSizeFunction = $this->_getSetSizeJS();
        $podcastJavascript .= <<<EOF
    <script type="text/javascript">
    //<![CDATA[
    if(typeof(setSize == 'undefined')){
        {$setSizeFunction}
    }
    //]]>
    </script>
EOF;
        $this->_objTpl->setVariable('PODCAST_JAVASCRIPT', $podcastJavascript);
    }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:98,代码来源:Podcast.class.php

示例8: editCategory

 /**
  * prepare and show the edit category page
  *
  */
 function editCategory()
 {
     global $_ARRAYLANG, $_CORELANG;
     $catId = !empty($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
     $this->_pageTitle = $_ARRAYLANG['TXT_BLOCK_CATEGORIES_EDIT'];
     $this->_objTpl->loadTemplateFile('module_block_categories_edit.html');
     $arrCategory = $this->_getCategory($_GET['id']);
     $this->_objTpl->setVariable(array('TXT_BLOCK_NAME' => $_ARRAYLANG['TXT_BLOCK_NAME'], 'TXT_BLOCK_SAVE' => $_ARRAYLANG['TXT_BLOCK_SAVE'], 'TXT_BLOCK_PARENT' => $_ARRAYLANG['TXT_BLOCK_PARENT'], 'TXT_BLOCK_NONE' => $_ARRAYLANG['TXT_BLOCK_NONE'], 'TXT_BLOCK_CATEGORIES_EDIT' => $_ARRAYLANG['TXT_BLOCK_CATEGORIES_EDIT'], 'TXT_BLOCK_BACK' => $_CORELANG['TXT_BACK'], 'TXT_BLOCK_CATEGORY_SEPERATOR' => $_ARRAYLANG['TXT_BLOCK_CATEGORY_SEPERATOR'], 'BLOCK_CATEGORY_ID' => $catId, 'BLOCK_CATEGORIES_PARENT_DROPDOWN' => $this->_getCategoriesDropdown($arrCategory['parent'], $catId), 'BLOCK_CATEGORY_NAME' => contrexx_raw2xhtml($arrCategory['name']), 'BLOCK_CATEGORY_SEPERATOR' => contrexx_raw2xhtml($arrCategory['seperator']), 'DIRECTORY_INDEX' => CONTREXX_DIRECTORY_INDEX, 'CSRF_PARAM' => \Cx\Core\Csrf\Controller\Csrf::param()));
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:13,代码来源:BlockManager.class.php

示例9: getCustomerTypeJavascript

    /**
     * Get customer type script
     *
     * @return String $javascript
     */
    function getCustomerTypeJavascript()
    {
        global $_CORELANG, $_ARRAYLANG, $objDatabase;
        $TXT_CRM_SURE_TO_DELETE_SELECTED_ENTRIES = $_ARRAYLANG['TXT_CRM_SURE_TO_DELETE_SELECTED_ENTRIES'];
        $TXT_CRM_ENTER_LABEL_FIELD = $_ARRAYLANG['TXT_CRM_ENTER_LABEL_FIELD'];
        $TXT_CRM_ENTER_LABEL_FIELD_WITHOUT_SPECIAL_CHARACTERS = $_ARRAYLANG['TXT_CRM_ENTER_LABEL_FIELD_WITHOUT_SPECIAL_CHARACTERS'];
        $TXT_CRM_ENTER_DISCOUNT_PERCENT = $_ARRAYLANG['TXT_CRM_ENTER_DISCOUNT_PERCENT'];
        $TXT_CRM_PLEASE_ENTER_DISCOUNT_PERCENT_IN_NUMBER = $_ARRAYLANG['TXT_CRM_PLEASE_ENTER_DISCOUNT_PERCENT_IN_NUMBER'];
        $TXT_CRM_ARE_YOU_SURE_TO_DELETE_THE_ENTRY = $_ARRAYLANG['TXT_CRM_ARE_YOU_SURE_TO_DELETE_THE_ENTRY'];
        $TXT_CRM_NOTHING_SELECTED = $_ARRAYLANG['TXT_CRM_NOTHING_SELECTED'];
        $TXT_CRM_SAME_SORTVALUE = $_ARRAYLANG['TXT_CRM_SAME_SORTVALUE'];
        $TXT_ENTER_SORTING = $_ARRAYLANG['TXT_ENTER_SORTING'];
        $TXT_SORTING_NUMERIC = $_ARRAYLANG['TXT_SORTING_NUMERIC'];
        $TXT_MANDATORY_ERROR = $_ARRAYLANG['TXT_CRM_MANDATORY_FIELDS_NOT_FILLED_OUT'];
        $MODULE_NAME = $this->moduleName;
        $CSRFPARAM = \Cx\Core\Csrf\Controller\Csrf::param();
        $javascript = <<<END
        <script type="text/javascript" src="../lib/javascript/jquery.js"></script> 
        <script language="JavaScript" type="text/javascript">
          var \$j  = jQuery.noConflict(); 
          \$j(document).ready(function () {
          \$j("input").keyup(function () {
                \$j(this).css("border","1px solid #0A50A1");
          });
          \$j("select").change(function () {
                \$j(this).css("border","1px solid #0A50A1");
          });          
          });
                  
        //<![CDATA[
        function trim(sString)
{
while (sString.substring(0,1) == ' ')
{
sString = sString.substring(1, sString.length);
}
while (sString.substring(sString.length-1, sString.length) == ' ')
{
sString = sString.substring(0,sString.length-1);
}
return sString;
}

function ltrim(s)
{
\tvar l=0;
\twhile(l < s.length && s[l] == ' ')
\t{\tl++; }
\treturn s.substring(l, s.length);
}

function rtrim(s)
{
\tvar r=s.length -1;
\twhile(r > 0 && s[r] == ' ')
\t{\tr-=1;\t}
\treturn s.substring(0, r+1);
}

function IsNumeric(strString)
   //  check for valid numeric strings
   {
   var strValidChars = "0123456789";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }


function selectMultiAction() {


\twith (document.frmShowCustomerEntries) {
                             var chks = document.getElementsByName('selectedEntriesId[]');
                             var hasChecked = false;
                             // Get the checkbox array length and iterate it to see if any of them is selected
                             for (var i = 0; i < chks.length; i++){
                                if (chks[i].checked){
                                      hasChecked = true;
                                      break;
                                }
                             }
                               if (!hasChecked) {
//.........这里部分代码省略.........
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:101,代码来源:CrmJavascript.class.php

示例10: showCurrent

 function showCurrent()
 {
     global $objDatabase, $_ARRAYLANG;
     $this->_objTpl->loadTemplateFile('voting_results.html');
     $query = "SELECT COUNT(1) as `count` FROM " . DBPREFIX . "voting_system";
     $objResult = $objDatabase->Execute($query);
     if ($objResult) {
         $totalrows = $objResult->fields['count'];
     }
     $votingId = (!isset($_GET['act']) || $_GET['act'] != "delete") && isset($_GET['votingid']) ? intval($_GET['votingid']) : 0;
     $query = "SELECT id, date as datesec, question, votes FROM " . DBPREFIX . "voting_system where " . ($votingId > 0 ? "id=" . $votingId : "status=1");
     $objResult = $objDatabase->SelectLimit($query, 1);
     if ($objResult->RecordCount() == 0 && $totalrows == 0) {
         \Cx\Core\Csrf\Controller\Csrf::header("Location: ?cmd=Voting&act=add");
         exit;
     } else {
         $votingId = $objResult->fields['id'];
         $votingTitle = stripslashes($objResult->fields['question']);
         $votingVotes = $objResult->fields['votes'];
         $votingDate = strtotime($objResult->fields['datesec']);
         $images = 1;
         $query = "SELECT id, question, votes FROM " . DBPREFIX . "voting_results WHERE voting_system_id='{$votingId}' ORDER BY id";
         $objResult = $objDatabase->Execute($query);
         $votingResultText = '';
         while (!$objResult->EOF) {
             $votes = intval($objResult->fields['votes']);
             $percentage = 0;
             $imagewidth = 1;
             //Mozilla Bug if image width=0
             if ($votes > 0) {
                 $percentage = round($votes / $votingVotes * 10000) / 100;
                 $imagewidth = round($percentage, 0);
             }
             $votingResultText .= stripslashes($objResult->fields['question']) . "<br />\n";
             $votingResultText .= "<img src='../core/Core/View/Media/icons/{$images}.gif' width='{$imagewidth}%' height=\"10\" alt=\"{$votes} " . $_ARRAYLANG['TXT_VOTES'] . " / {$percentage} %\" />";
             $votingResultText .= "&nbsp;<font size='1'>{$votes} " . $_ARRAYLANG['TXT_VOTES'] . " / {$percentage} %</font><br />\n";
             $objResult->MoveNext();
         }
         $this->_objTpl->setVariable(array('VOTING_TITLE' => $votingTitle, 'VOTING_DATE' => showFormattedDate($votingDate), 'VOTING_RESULTS_TEXT' => $votingResultText, 'VOTING_RESULTS_TOTAL_VOTES' => $votingVotes, 'VOTING_TOTAL_TEXT' => $_ARRAYLANG['TXT_VOTING_TOTAL'], 'TXT_DATE' => $_ARRAYLANG['TXT_DATE'], 'TXT_TITLE' => $_ARRAYLANG['TXT_TITLE'], 'TXT_VOTES' => $_ARRAYLANG['TXT_VOTES'], 'TXT_ACTION' => $_ARRAYLANG['TXT_ACTION'], 'TXT_ACTIVATION' => $_ARRAYLANG['TXT_ACTIVATION'], 'TXT_CREATE_HTML' => $_ARRAYLANG['TXT_CREATE_HTML'], 'TXT_CONFIRM_DELETE_DATA' => $_ARRAYLANG['TXT_CONFIRM_DELETE_DATA'], 'TXT_ACTION_IS_IRREVERSIBLE' => $_ARRAYLANG['TXT_ACTION_IS_IRREVERSIBLE'], 'TXT_EXPORT_ADDITIONAL' => $_ARRAYLANG['TXT_EXPORT_ADDITIONAL']));
         $this->_objTpl->setGlobalVariable('TXT_HTML_CODE', $_ARRAYLANG['TXT_HTML_CODE']);
         // show other Voting entries
         $query = "SELECT id,status,submit_check, date as datesec, title, votes FROM " . DBPREFIX . "voting_system order by id desc";
         $objResult = $objDatabase->Execute($query);
         $i = 0;
         while (!$objResult->EOF) {
             $votingid = $objResult->fields['id'];
             $votingTitle = stripslashes($objResult->fields['title']);
             $votingVotes = $objResult->fields['votes'];
             $votingDate = strtotime($objResult->fields['datesec']);
             $votingStatus = $objResult->fields['status'];
             if ($votingStatus == 0) {
                 $radio = " onclick=\"Javascript: window.location.replace('index.php?cmd=Voting&amp;" . \Cx\Core\Csrf\Controller\Csrf::param() . "&amp;act=changestatus&amp;votingid={$votingid}');\" />";
             } else {
                 $radio = " checked=\"checked\" />";
             }
             if ($i % 2 == 0) {
                 $class = "row1";
             } else {
                 $class = "row2";
             }
             $this->_objTpl->setVariable(array('VOTING_OLDER_TEXT' => "<a href='?cmd=Voting&amp;votingid={$votingid}'>" . $votingTitle . "</a>", 'VOTING_OLDER_DATE' => showFormattedDate($votingDate), 'VOTING_OLDER_VOTES' => $votingVotes > 0 && $objResult->fields['submit_check'] == 'email' ? '<a href="?cmd=Voting&amp;act=detail&amp;id=' . $votingid . '" title="' . $_ARRAYLANG['TXT_VOTING_SHOW_EMAIL_ADRESSES'] . '">' . $votingVotes . '</a>' : $votingVotes, 'VOTING_ID' => $votingid, 'VOTING_LIST_CLASS' => $class, 'VOTING_RADIO' => "<input type='radio' name='voting_selected' value='radiobutton'" . $radio, 'TXT_EXPORT_CSV' => $_ARRAYLANG['TXT_EXPORT_CSV']));
             $this->_objTpl->parse("votingRow");
             $i++;
             $objResult->MoveNext();
         }
     }
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:67,代码来源:VotingManager.class.php

示例11: getCreateSurveyJavascript

    function getCreateSurveyJavascript()
    {
        global $_CORELANG, $_ARRAYLANG, $objDatabase;
        $TXT_SURVEY_NOITEM_SELECTED_ERR = $_ARRAYLANG['TXT_SURVEY_NOITEM_SELECTED_ERR'];
        $TXT_SURVEY_CONFIRM_DELETE_ERR = $_ARRAYLANG['TXT_SURVEY_CONFIRM_DELETE_ERR'];
        $TXT_SURVEY_SORTING_NUMBER_ERR = $_ARRAYLANG['TXT_SURVEY_SORTING_NUMBER_ERR'];
        $TXT_SURVEY_SORTING_NUMBER_NUM_ERR = $_ARRAYLANG['TXT_SURVEY_SORTING_NUMBER_NUM_ERR'];
        $TXT_SURVEY_SORTING_NUMBER_NOTSAME_ERR = $_ARRAYLANG['TXT_SURVEY_SORTING_NUMBER_NOTSAME_ERR'];
        $TXT_SURVEY_SELECT_ANSWER_INPUT_ERR = $_ARRAYLANG['TXT_SURVEY_SELECT_ANSWER_INPUT_ERR'];
        $TXT_SURVEY_ENTER_QUESTION_ERR = $_ARRAYLANG['TXT_SURVEY_ENTER_QUESTION_ERR'];
        $TXT_SURVEY_ENTER_ANSWER_ERR = $_ARRAYLANG['TXT_SURVEY_ENTER_ANSWER_ERR'];
        $TXT_SURVEY_ENTER_COLUMN_ERR = $_ARRAYLANG['TXT_SURVEY_ENTER_COLUMN_ERR'];
        $TXT_SURVEY_ENTER_TITLE_ERR = $_ARRAYLANG['TXT_SURVEY_ENTER_TITLE_ERR'];
        $TXT_SURVEY_HOMEBOX_ERR = $_ARRAYLANG['TXT_SURVEY_HOMEBOX_ERR'];
        $TXT_SURVEY_SELECT_EMAIL_ERR = $_ARRAYLANG['TXT_SURVEY_SELECT_EMAIL_ERR'];
        $TXT_SHOW = $_ARRAYLANG['TXT_SHOW'];
        $TXT_HIDE = $_ARRAYLANG['TXT_HIDE'];
        $CSRF_PARAM = \Cx\Core\Csrf\Controller\Csrf::param();
        $javascript = <<<END
        <script language="JavaScript" type="text/javascript">
       
        function trim(sString){
              while (sString.substring(0,1) == ' '){
               sString = sString.substring(1, sString.length);
              }
              while (sString.substring(sString.length-1, sString.length) == ' '){
               sString = sString.substring(0,sString.length-1);
              }
         return sString;
        }
        function ltrim(s){
       \tvar l=0;
\t       while(l < s.length && s[l] == ' ')
\t       {\tl++; }
       \treturn s.substring(l, s.length);
        }
        function rtrim(s){
       \tvar r=s.length -1;
\t       while(r > 0 && s[r] == ' ')
\t       {\tr-=1;\t}
\t       return s.substring(0, r+1);
        }
       function IsNumeric(strString){
        //  check for valid numeric strings\t
        var strValidChars = "0123456789";
          var strChar;
          var blnResult = true;
          if (strString.length == 0) return false;
          //  test strString consists of valid characters listed above
          for (i = 0; i < strString.length && blnResult == true; i++)
             {
             strChar = strString.charAt(i);
             if (strValidChars.indexOf(strChar) == -1)
                {
                blnResult = false;
                }
             }
          return blnResult;
       }
       function showColumnTab(){
         var matrix = document.getElementById("questionType").value;
       
         var helplink;
   \t if((matrix == 3) || (matrix == 4)){

         document.getElementById("col").style.display='';

         }else{
         document.getElementById("col").style.display='none';
         }

\t if(matrix == 5){
         document.getElementById("answer").style.display='none';
\t  document.getElementById("addComent").style.display='';
          document.getElementById("RowTextfield").style.display='none';
  \t document.getElementById("qTextfield").style.display='';
         }
\telse if(matrix == 7){
\t  document.getElementById("addComent").style.display='none';
         document.getElementById("answer").style.display='none';
\t document.getElementById("qTextfield").style.display='none';
         document.getElementById("RowTextfield").style.display='';
         }
   \telse{
\t  document.getElementById("addComent").style.display='';
         document.getElementById("answer").style.display='';
         document.getElementById("RowTextfield").style.display='none';
\t document.getElementById("qTextfield").style.display='';
         }

\t if(matrix == 1){
\t\tdocument.getElementById("help1").style.display="";
\t\tdocument.getElementById("help2").style.display="none";
\t\tdocument.getElementById("help3").style.display="none";
\t\tdocument.getElementById("help4").style.display="none";
\t\tdocument.getElementById("help5").style.display="none";
\t\tdocument.getElementById("help6").style.display="none";
\t\tdocument.getElementById("help7").style.display="none";
\t }else if(matrix == 2){
\t\tdocument.getElementById("help1").style.display="none";
//.........这里部分代码省略.........
开发者ID:Niggu,项目名称:cloudrexx,代码行数:101,代码来源:SurveyManager.class.php

示例12: _media

 function _media()
 {
     global $_ARRAYLANG, $_CONFIG;
     $this->_objTpl->loadTemplatefile('module_podcast_media.html');
     $this->_pageTitle = $_ARRAYLANG['TXT_PODCAST_MEDIA'];
     $this->_objTpl->setVariable(array('TXT_PODCAST_STATUS' => $_ARRAYLANG['TXT_PODCAST_STATUS'], 'TXT_PODCAST_TITLE' => $_ARRAYLANG['TXT_PODCAST_TITLE'], 'TXT_PODCAST_AUTHOR' => $_ARRAYLANG['TXT_PODCAST_AUTHOR'], 'TXT_PODCAST_DATE' => $_ARRAYLANG['TXT_PODCAST_DATE'], 'TXT_PODCAST_TEMPLATE' => $_ARRAYLANG['TXT_PODCAST_TEMPLATE'], 'TXT_PODCAST_FUNCTIONS' => $_ARRAYLANG['TXT_PODCAST_FUNCTIONS'], 'TXT_PODCAST_ADD_MEDIUM' => $_ARRAYLANG['TXT_PODCAST_ADD_MEDIUM'], 'TXT_PODCAST_CONFIRM_DELETE_MEDIUM_MSG' => $_ARRAYLANG['TXT_PODCAST_CONFIRM_DELETE_MEDIUM_MSG'], 'TXT_PODCAST_OPERATION_IRREVERSIBLE' => $_ARRAYLANG['TXT_PODCAST_OPERATION_IRREVERSIBLE'], 'TXT_PODCAST_CHECK_ALL' => $_ARRAYLANG['TXT_PODCAST_CHECK_ALL'], 'TXT_PODCAST_UNCHECK_ALL' => $_ARRAYLANG['TXT_PODCAST_UNCHECK_ALL'], 'TXT_PODCAST_WITH_SELECTED' => $_ARRAYLANG['TXT_PODCAST_WITH_SELECTED'], 'TXT_PODCAST_DELETE' => $_ARRAYLANG['TXT_PODCAST_DELETE'], 'TXT_PODCAST_CONFIRM_DELETE_MEDIA_MSG' => $_ARRAYLANG['TXT_PODCAST_CONFIRM_DELETE_MEDIA_MSG'], 'TXT_PODCAST_SHOW_MEDIUM' => $_ARRAYLANG['TXT_PODCAST_SHOW_MEDIUM']));
     $this->_objTpl->setGlobalVariable(array('TXT_PODCAST_SHOW_HTML_SOURCE_CODE' => $_ARRAYLANG['TXT_PODCAST_SHOW_HTML_SOURCE_CODE'], 'TXT_PODCAST_MODIFY_MEDIUM' => $_ARRAYLANG['TXT_PODCAST_MODIFY_MEDIUM'], 'TXT_PODCAST_DELETE_MEDIUM' => $_ARRAYLANG['TXT_PODCAST_DELETE_MEDIUM']));
     $rowNr = 0;
     $paging = "";
     $categoryId = false;
     $arrCategory = false;
     if (isset($_GET['categoryId']) && ($arrCategory =& $this->_getCategory(intval($_GET['categoryId']))) !== false) {
         $categoryId = intval($_GET['categoryId']);
         $this->_objTpl->setVariable('PODCAST_MEDIA_TITLE_TXT', sprintf($_ARRAYLANG['TXT_PODCAST_MEDIA_OF_CATEGORY'], $arrCategory['title']));
     } else {
         $this->_objTpl->setVariable('PODCAST_MEDIA_TITLE_TXT', $_ARRAYLANG['TXT_PODCAST_MEDIA']);
     }
     $pos = isset($_GET['pos']) ? intval($_GET['pos']) : 0;
     $arrMedia =& $this->_getMedia($categoryId, false, $_CONFIG['corePagingLimit'], $pos);
     $mediaCount =& $this->_getMediaCount($categoryId);
     if ($mediaCount > $_CONFIG['corePagingLimit']) {
         $paging = getPaging($mediaCount, $pos, '&cmd=Podcast&categoryId=' . $categoryId, $_ARRAYLANG['TXT_PODCAST_MEDIA']);
         $this->_objTpl->setVariable('PODCAST_PAGING', $paging . "<br /><br />\n");
     }
     if ($mediaCount > 0) {
         $arrTemplates =& $this->_getTemplates();
         foreach ($arrMedia as $mediumId => $arrMedium) {
             $this->_objTpl->setVariable(array('PODCAST_ROW_CLASS' => $rowNr % 2 == 1 ? 'row1' : 'row2', 'PODCAST_MEDIUM_ID' => $mediumId, 'PODCAST_MEDIUM_STATUS_IMG' => $arrMedium['status'] == 1 ? 'led_green.gif' : 'led_red.gif', 'PODCAST_MEDIUM_STATUS_TXT' => $arrMedium['status'] == 1 ? $_ARRAYLANG['TXT_PODCAST_ACTIVE'] : $_ARRAYLANG['TXT_PODCAST_INACTIVE'], 'PODCAST_MEDIUM_DATE' => date(ASCMS_DATE_FORMAT, $arrMedium['date_added']), 'PODCAST_MEDIUM_TITLE' => htmlentities($arrMedium['title'], ENT_QUOTES, CONTREXX_CHARSET), 'PODCAST_MEDIUM_AUTHOR' => !empty($arrMedium['author']) ? htmlentities($arrMedium['author'], ENT_QUOTES, CONTREXX_CHARSET) : '-', 'PODCAST_MEDIUM_TEMPLATE' => htmlentities($arrTemplates[$arrMedium['template_id']]['description'], ENT_QUOTES, CONTREXX_CHARSET)));
             $this->_objTpl->parse('podcast_media_list');
             $rowNr++;
         }
         $this->_objTpl->hideBlock('podcast_media_no_data');
         $this->_objTpl->touchBlock('podcast_media_data');
         $this->_objTpl->touchBlock('podcast_media_multi_select_action');
     } else {
         if ($arrCategory) {
             $this->_objTpl->setVariable('PODCAST_EMPTY_CATEGORY_MSG_TXT', sprintf($_ARRAYLANG['TXT_PODCAST_EMPTY_CATEGORY_MSG'], $arrCategory['title']));
         } else {
             $this->_objTpl->setVariable('PODCAST_EMPTY_CATEGORY_MSG_TXT', 'Die Medien Bibliothek ist leer!');
         }
         $this->_objTpl->touchBlock('podcast_media_no_data');
         $this->_objTpl->hideBlock('podcast_media_data');
         $this->_objTpl->hideBlock('podcast_media_multi_select_action');
     }
     if ($mediaCount > 0 || $categoryId) {
         $this->_objTpl->setVariable('PODCAST_CATEGORY_MENU', $this->_getCategoriesMenu($categoryId, 'onchange="window.location.href=\'index.php?cmd=Podcast&amp;' . \Cx\Core\Csrf\Controller\Csrf::param() . '&amp;categoryId=\'+this.value"'));
         $this->_objTpl->touchBlock('podcast_category_menu');
     } else {
         $this->_objTpl->hideBlock('podcast_category_menu');
     }
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:51,代码来源:PodcastManager.class.php

示例13: getViewGeneratorOptions

 /**
  * This function returns the ViewGeneration options for a given entityClass
  *
  * @access protected
  * @global $_ARRAYLANG
  * @param $entityClassName contains the FQCN from entity
  * @return array with options
  */
 protected function getViewGeneratorOptions($entityClassName)
 {
     global $_ARRAYLANG;
     $classNameParts = explode('\\', $entityClassName);
     $classIdentifier = end($classNameParts);
     $langVarName = 'TXT_' . strtoupper($this->getType() . '_' . $this->getName() . '_ACT_' . $classIdentifier);
     $header = '';
     if (isset($_ARRAYLANG[$langVarName])) {
         $header = $_ARRAYLANG[$langVarName];
     }
     switch ($entityClassName) {
         case 'Cx\\Core\\Net\\Model\\Entity\\Domain':
             return array('header' => $_ARRAYLANG['TXT_CORE_NETMANAGER'], 'entityName' => $_ARRAYLANG['TXT_CORE_NETMANAGER_ENTITY'], 'fields' => array('name' => array('header' => $_ARRAYLANG['TXT_NAME'], 'table' => array('parse' => function ($value) {
                 global $_ARRAYLANG;
                 static $mainDomainName;
                 if (empty($mainDomainName)) {
                     $domainRepository = new \Cx\Core\Net\Model\Repository\DomainRepository();
                     $mainDomainName = $domainRepository->getMainDomain()->getName();
                 }
                 $domainName = contrexx_raw2xhtml(\Cx\Core\Net\Controller\ComponentController::convertIdnToUtf8Format($value));
                 if ($domainName != contrexx_raw2xhtml($value)) {
                     $domainName .= ' (' . contrexx_raw2xhtml($value) . ')';
                 }
                 $mainDomainIcon = '';
                 if ($value == $mainDomainName) {
                     $mainDomainIcon = ' <img src="' . \Env::get('cx')->getCodeBaseCoreWebPath() . '/Core/View/Media/icons/Home.png" title="' . $_ARRAYLANG['TXT_CORE_CONFIG_MAINDOMAINID'] . '" />';
                 }
                 return $domainName . $mainDomainIcon;
             }), 'formfield' => function ($fieldname, $fieldtype, $fieldlength, $fieldvalue, $fieldoptions) {
                 return \Cx\Core\Net\Controller\ComponentController::convertIdnToUtf8Format($fieldvalue);
             }), 'id' => array('showOverview' => false)), 'functions' => array('add' => true, 'edit' => false, 'allowEdit' => true, 'delete' => false, 'allowDelete' => true, 'sorting' => true, 'paging' => true, 'filtering' => false, 'actions' => function ($rowData, $rowId) {
                 global $_CORELANG;
                 static $mainDomainName;
                 if (empty($mainDomainName)) {
                     $domainRepository = new \Cx\Core\Net\Model\Repository\DomainRepository();
                     $mainDomainName = $domainRepository->getMainDomain()->getName();
                 }
                 preg_match_all('/\\d+/', $rowId, $ids, null, 0);
                 $actionIcons = '';
                 $csrfParams = \Cx\Core\Csrf\Controller\Csrf::param();
                 if ($mainDomainName !== $rowData['name']) {
                     $actionIcons = '<a ' . 'href="' . \Env::get('cx')->getWebsiteBackendPath() . '/?cmd=NetManager&amp;editid=' . $rowId . '"' . 'class="edit" title="Edit entry">' . '</a>';
                     $actionIcons .= '<a
                                 onclick=" if(confirm(\'' . $_CORELANG['TXT_CORE_RECORD_DELETE_CONFIRM'] . '\'))' . 'window.location.replace(\'' . \Env::get('cx')->getWebsiteBackendPath() . '/?cmd=NetManager&amp;deleteid=' . (empty($ids[0][1]) ? 0 : $ids[0][1]) . '&amp;vg_increment_number=' . (empty($ids[0][0]) ? 0 : $ids[0][0]) . '&amp;' . $csrfParams . '\');" href="javascript:void(0);"' . 'class="delete"' . 'title="Delete entry">
                                 </a>';
                 }
                 return $actionIcons;
             }));
         default:
             return array('header' => $header, 'functions' => array('add' => true, 'edit' => true, 'delete' => true, 'sorting' => true, 'paging' => true, 'filtering' => false));
             break;
     }
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:61,代码来源:BackendController.class.php

示例14: showMembership


//.........这里部分代码省略.........
         return;
     }
     $action = isset($_REQUEST['actionType']) ? $_REQUEST['actionType'] : '';
     $memberEntries = isset($_REQUEST['memberEntry']) ? array_map('intval', $_REQUEST['memberEntry']) : 0;
     $memberEntriesorting = isset($_REQUEST['sorting']) ? array_map('intval', $_REQUEST['sorting']) : 0;
     if (isset($_SESSION['strOkMessage'])) {
         $strMessage = is_array($_SESSION['strOkMessage']) ? implode("<br>", $_SESSION['strOkMessage']) : $_SESSION['strOkMessage'];
         $this->_strOkMessage = $strMessage;
         unset($_SESSION['strOkMessage']);
     }
     switch ($action) {
         case 'changestatus':
             $this->activateMembership((int) $_GET['id']);
             if (isset($_GET['ajax'])) {
                 exit;
             }
         case 'activate':
             $this->activateMembership($memberEntries);
             break;
         case 'deactivate':
             $this->activateMembership($memberEntries, true);
             break;
         case 'delete':
             $this->deleteMemberships($memberEntries);
             break;
         case 'deleteMembership':
             $this->deleteMembership();
             if (isset($_GET['ajax'])) {
                 exit;
             }
             break;
         default:
             break;
     }
     if (!empty($action) || isset($_POST['save_entries'])) {
         $this->saveSortingMembership($memberEntriesorting);
     }
     $objTpl = $this->_objTpl;
     $objTpl->addBlockfile('CRM_SETTINGS_FILE', 'settings_block', 'module_' . $this->moduleNameLC . '_settings_membership.html');
     $this->_pageTitle = $_ARRAYLANG['TXT_CRM_SETTINGS'];
     $objTpl->setGlobalVariable(array('MODULE_NAME' => $this->moduleName, 'TXT_CRM_IMAGE_EDIT' => $_ARRAYLANG['TXT_CRM_IMAGE_EDIT'], 'TXT_CRM_IMAGE_DELETE' => $_ARRAYLANG['TXT_CRM_IMAGE_DELETE']));
     // tab 2
     $id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
     $name = isset($_POST['name']) ? contrexx_input2raw($_POST['name']) : '';
     $sorting = isset($_POST['sortingNumber']) ? (int) $_POST['sortingNumber'] : '';
     $status = isset($_POST['activeStatus']) ? 1 : (empty($_POST) ? 1 : 0);
     $inputField = isset($_POST['Inputfield']) ? $_POST['Inputfield'] : array();
     if (isset($_POST['save_entry'])) {
         $fields = array('sorting' => $sorting, 'status' => $status);
         $field_set = '';
         foreach ($fields as $col => $val) {
             if ($val !== null) {
                 $field_set[] = "`{$col}` = '" . contrexx_input2db($val) . "'";
             }
         }
         $field_set = implode(', ', $field_set);
         if (!empty($id)) {
             $query = "UPDATE `" . DBPREFIX . "module_{$this->moduleNameLC}_memberships` SET\n                        {$field_set}\n                  WHERE `id` = {$id}";
             $_SESSION['strOkMessage'] = $_ARRAYLANG['TXT_CRM_ENTRY_UPDATED_SUCCESS'];
         } else {
             $query = "INSERT INTO `" . DBPREFIX . "module_{$this->moduleNameLC}_memberships` SET\n                        {$field_set}";
         }
         $db = $objDatabase->Execute($query);
         $entryId = !empty($id) ? $id : $objDatabase->INSERT_ID();
         // Insert the name locale
         if ($db) {
             $objDatabase->Execute("DELETE FROM `" . DBPREFIX . "module_{$this->moduleNameLC}_membership_local` WHERE entry_id = {$entryId}");
             foreach ($this->_arrLanguages as $langId => $langValue) {
                 $value = empty($inputField[$langId]) ? contrexx_input2db($inputField[0]) : contrexx_input2db($inputField[$langId]);
                 $objDatabase->Execute("\n                        INSERT INTO `" . DBPREFIX . "module_{$this->moduleNameLC}_membership_local` SET\n                            `entry_id` = {$entryId},\n                            `lang_id`   = {$langId},\n                            `value`    = '{$value}'\n                            ");
             }
         }
         if ($db) {
             $_SESSION['strOkMessage'] = $_ARRAYLANG['TXT_CRM_ENTRY_ADDED_SUCCESS'];
         } else {
             $this->_strErrMessage = "Error in saving Data";
         }
     }
     $first = true;
     foreach ($this->_arrLanguages as $langId => $langValue) {
         $first ? $objTpl->touchBlock("minimize") : $objTpl->hideBlock("minimize");
         $first = false;
         $objTpl->setVariable(array('LANG_ID' => $langId, 'LANG_LONG_NAME' => $langValue['long'], 'LANG_SHORT_NAME' => $langValue['short'], 'CRM_SETTINGS_VALUE' => isset($inputField[$langId]) ? contrexx_raw2xhtml($inputField[$langId]) : ''));
         $objTpl->parse("settingsNames");
     }
     //show all records
     $query = "SELECT membership.*,\n                         memberLoc.value,\n                         (SELECT COUNT(1) FROM\n                            `" . DBPREFIX . "module_{$this->moduleNameLC}_customer_membership` as m\n                            WHERE m.membership_id = membership.id)\n                         as cusCount\n                     FROM `" . DBPREFIX . "module_{$this->moduleNameLC}_memberships` AS membership\n                     LEFT JOIN `" . DBPREFIX . "module_{$this->moduleNameLC}_membership_local` AS memberLoc\n                        ON membership.id = memberLoc.entry_id\n                     WHERE memberLoc.lang_id = " . $_LANGID . " ORDER BY sorting ASC ";
     $objResult = $objDatabase->Execute($query);
     if ($objResult && $objResult->RecordCount() == 0) {
         $objTpl->setVariable(array('TXT_NO_RECORDS_FOUND' => $_ARRAYLANG['TXT_CRM_NO_RECORDS_FOUND']));
     }
     while (!$objResult->EOF) {
         $activeImage = $objResult->fields['status'] ? '../core/Core/View/Media/icons/led_green.gif' : '../core/Core/View/Media/icons/led_red.gif';
         $objTpl->setVariable(array('ENTRY_ID' => $objResult->fields['id'], 'CRM_SORTING' => (int) $objResult->fields['sorting'], 'CRM_SUCCESS_STATUS' => $activeImage, 'CRM_CUSTOMER_COUNT' => (int) $objResult->fields['cusCount'], 'CRM_INDUSTRY_NAME' => contrexx_raw2xhtml($objResult->fields['value'])));
         $objTpl->parse("membershipEntries");
         $objResult->MoveNext();
     }
     $objTpl->setGlobalVariable(array('TXT_CRM_MORE' => $_ARRAYLANG['TXT_CRM_MORE'], 'TXT_CRM_MINIMIZE' => $_ARRAYLANG['TXT_CRM_MINIMIZE']));
     $objTpl->setVariable(array('DEFAULT_LANG_ID' => $_LANGID, 'LANG_ARRAY' => implode(',', array_keys($this->_arrLanguages)), 'CSRF_PARAM' => \Cx\Core\Csrf\Controller\Csrf::param(), 'TXT_CRM_CUSTOMER_MEMBERSHIP' => $_ARRAYLANG['TXT_CRM_CUSTOMER_MEMBERSHIP'], 'TXT_CRM_ADD_MEMBERSHIP' => $_ARRAYLANG['TXT_CRM_ADD_MEMBERSHIP'], 'TXT_STATUS' => $_ARRAYLANG['TXT_STATUS'], 'TXT_CRM_LABEL' => $_ARRAYLANG['TXT_CRM_LABEL'], 'TXT_CRM_SAVE' => $_ARRAYLANG['TXT_CRM_SAVE'], 'TXT_CRM_SORTING' => $_ARRAYLANG['TXT_CRM_SORTING'], 'TXT_CRM_FUNCTIONS' => $_ARRAYLANG['TXT_CRM_FUNCTIONS'], 'TXT_CRM_SELECT_ALL' => $_ARRAYLANG['TXT_CRM_SELECT_ALL'], 'TXT_CRM_REMOVE_SELECTION' => $_ARRAYLANG['TXT_CRM_REMOVE_SELECTION'], 'TXT_CRM_SELECT_ACTION' => $_ARRAYLANG['TXT_CRM_SELECT_ACTION'], 'TXT_CRM_ACTIVATESELECTED' => $_ARRAYLANG['TXT_CRM_ACTIVATESELECTED'], 'TXT_CRM_DEACTIVATESELECTED' => $_ARRAYLANG['TXT_CRM_DEACTIVATESELECTED'], 'TXT_CRM_DELETE_SELECTED' => $_ARRAYLANG['TXT_CRM_DELETE_SELECTED'], 'TXT_CRM_CHANGE_STATUS' => $_ARRAYLANG['TXT_CRM_CHANGE_STATUS'], 'TXT_CRM_ENTRY_DELETED_SUCCESS' => $_ARRAYLANG['TXT_CRM_ENTRY_DELETED_SUCCESS'], 'TXT_CRM_NOTHING_SELECTED' => $_ARRAYLANG['TXT_CRM_NOTHING_SELECTED'], 'TXT_CRM_NAME' => $_ARRAYLANG['TXT_CRM_LABEL'], 'TXT_CRM_TITLEACTIVE' => $_ARRAYLANG['TXT_CRM_TITLEACTIVE'], 'TXT_CRM_SORTING_NUMBER' => $_ARRAYLANG['TXT_CRM_SORTING_NUMBER'], 'TXT_CRM_ARE_YOU_SURE_DELETE_ENTRIES' => $_ARRAYLANG['TXT_CRM_ARE_YOU_SURE_DELETE_ENTRIES'], 'TXT_CRM_MANDATORY_FIELDS_NOT_FILLED_OUT' => $_ARRAYLANG['TXT_CRM_MANDATORY_FIELDS_NOT_FILLED_OUT'], 'TXT_CRM_ARE_YOU_SURE_DELETE_SELECTED_ENTRIES' => $_ARRAYLANG['TXT_CRM_ARE_YOU_SURE_DELETE_SELECTED_ENTRIES']));
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:101,代码来源:CrmManager.class.php

示例15: getJavascript

    /**
     * Returns needed javascripts for the forum-module
     *
     * @param     string         $type
     * @return    string        $strJavaScript
     */
    function getJavascript($type = '', $data = '')
    {
        global $_ARRAYLANG;
        switch ($type) {
            case 'scrollto':
                $strJavaScript = '
                <script type="text/javascript" language="JavaScript">
                //<![CDATA[
                    function setScrollPos(){
                        if (typeof(window.pageYOffset) != \'undefined\') {
                            offset = window.pageYOffset;
                        } else {
                            offset = document.documentElement.scrollTop;
                        }
                        if(document.getElementById("scrollpos")){
                            document.getElementById("scrollpos").value = offset;
                        }
                    }
                //]]>
                </script>
                ';
                break;
            case 'goto':
                $strJavaScript = '
                            <script type="text/javascript" language="JavaScript">
                            //<![CDATA[
                                function gotoForum(objSelect){
                                    id = objSelect.options[objSelect.selectedIndex].value;
                                    if(id==0){return top.location.href="index.php?section=Forum&' . \Cx\Core\Csrf\Controller\Csrf::param() . '";}
                                    if(id.indexOf("_cat") > -1){
                                        return top.location.href="index.php?section=Forum&cmd=cat&' . \Cx\Core\Csrf\Controller\Csrf::param() . '&id="+parseInt(id);
                                    }else{
                                        return top.location.href="index.php?section=Forum&cmd=board&' . \Cx\Core\Csrf\Controller\Csrf::param() . '&id="+id;
                                    }
                                }
                            //]]>
                            </script>
                        ';
                break;
            case 'deletePost':
                $strJavaScript = '
                            <script type="text/javascript" language="JavaScript">
                            //<![CDATA[
                                function deletePost(thread_id, post_id){
                                    if(confirm("' . $_ARRAYLANG['TXT_FORUM_CONFIRM_DELETE'] . '\\n' . $_ARRAYLANG['TXT_FORUM_CANNOT_UNDO_OPERATION'] . '")){
                                        window.location.href = "?section=Forum&cmd=thread&' . \Cx\Core\Csrf\Controller\Csrf::param() . '&id="+thread_id+"&act=delete&postid="+post_id;
                                    }
                                }
                            //]]>
                            </script>
                        ';
                break;
            case 'deleteThread':
                $strJavaScript = '
                            <script type="text/javascript" language="JavaScript">
                            //<![CDATA[
                                function deleteThread(category_id, thread_id){
                                    if(confirm("' . $_ARRAYLANG['TXT_FORUM_CONFIRM_DELETE'] . '\\n' . $_ARRAYLANG['TXT_FORUM_CANNOT_UNDO_OPERATION'] . '")){
                                        window.location.href = "?section=Forum&cmd=board&' . \Cx\Core\Csrf\Controller\Csrf::param() . '&id="+category_id+"&act=delete&threadid="+thread_id;
                                    }
                                }
                            //]]>
                            </script>
                        ';
                break;
            case 'notification':
                $strJavaScript = '
                            <script type="text/javascript" language="JavaScript">
                            //<![CDATA[
                                function AddToTheList(from,dest,add,remove){
                                    if(from.selectedIndex < 0){
                                        if(from.options[0] != null){
                                            from.options[0].selected = true;
                                        }
                                        from.focus();
                                        return false;
                                    }else{
                                        for(var i=0; i<from.length; i++){
                                            if (from.options[i].selected){
                                                dest.options[dest.length] = new Option( from.options[i].text, from.options[i].value, false, false);
                                               }
                                        }
                                        for (var i=from.length-1; i>=0; i--){
                                            if (from.options[i].selected){
                                               from.options[i] = null;
                                               }
                                        }
                                    }
                                    disableButtons(from,dest,add,remove);
                                }

                                function RemoveFromTheList(from,dest,add,remove){
                                    if ( dest.selectedIndex < 0){
                                        if (dest.options[0] != null){
//.........这里部分代码省略.........
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:101,代码来源:Forum.class.php


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