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


PHP jExit函数代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     $db = JFactory::getDBO();
     if ($field = JRequest::getVar('field')) {
         if (strpos($field, 'plugin') !== false) {
             if (JVM_VERSION === 1) {
                 $table = '#__plugins';
                 //$ext_id = 'id';
             } else {
                 $table = '#__extensions';
                 //$ext_id = 'extension_id';
             }
             $field = substr($field, 6);
             $q = 'SELECT `params`,`element` FROM `' . $table . '` WHERE `element` = "' . $field . '"';
             $db->setQuery($q);
             $this->plugin = $db->loadObject();
             $this->loadHelper('parameterparser');
             $parameters = new vmParameters($this->plugin, $this->plugin->element, 'plugin', 'vmuserfield');
             $lang = JFactory::getLanguage();
             $filename = 'plg_vmuserfield_' . $this->plugin->element;
             $lang->load($filename, JPATH_ADMINISTRATOR);
             echo $parameters->render();
             //echo '<input type="hidden" value="'.$this->plugin->element.'" name="custom_value">';
             jExit();
         }
     }
     jExit();
 }
开发者ID:joselapria,项目名称:virtuemart,代码行数:28,代码来源:view.json.php

示例2: display

 function display($tpl = null)
 {
     $document = JFactory::getDocument();
     $document->setMimeEncoding('application/json');
     if ($virtuemart_media_id = vRequest::getInt('virtuemart_media_id')) {
         //JResponse::setHeader( 'Content-Disposition', 'attachment; filename="media'.$virtuemart_media_id.'.json"' );
         $model = VmModel::getModel('Media');
         $image = $model->createMediaByIds($virtuemart_media_id);
         // 			echo '<pre>'.print_r($image,1).'</pre>';
         $this->json = $image[0];
         //echo json_encode($this->json);
         if (isset($this->json->file_url)) {
             $this->json->file_root = JURI::root(true) . '/';
             $this->json->msg = 'OK';
             echo @json_encode($this->json);
         } else {
             $this->json->msg = '<b>' . vmText::_('COM_VIRTUEMART_NO_IMAGE_SET') . '</b>';
             echo @json_encode($this->json);
         }
     } else {
         if (!class_exists('VmMediaHandler')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'mediahandler.php';
         }
         $start = vRequest::getInt('start', 0);
         $type = vRequest::getCmd('mediatype', 0);
         $list = VmMediaHandler::displayImages($type, $start);
         echo @json_encode($list);
     }
     jExit();
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:30,代码来源:view.json.php

示例3: display

 function display($tpl = null)
 {
     $db = JFactory::getDBO();
     if ($field = JRequest::getVar('field')) {
         if (strpos($field, 'plugin') !== false) {
             if (JVM_VERSION === 1) {
                 $table = '#__plugins';
                 //$ext_id = 'id';
             } else {
                 $table = '#__extensions';
                 //$ext_id = 'extension_id';
             }
             $field = substr($field, 6);
             $q = 'SELECT `params`,`element` FROM `' . $table . '` WHERE `element` = "' . $field . '"';
             $db->setQuery($q);
             $this->plugin = $db->loadObject();
             if (!class_exists('vmParameters')) {
                 require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'parameterparser.php';
             }
             $parameters = new vmParameters($this->plugin, $this->plugin->element, 'plugin', 'vmuserfield');
             $lang = JFactory::getLanguage();
             $filename = 'plg_vmuserfield_' . $this->plugin->element;
             if (VmConfig::get('enableEnglish', 1)) {
                 $lang->load($filename, JPATH_ADMINISTRATOR, 'en-GB', true);
             }
             $lang->load($filename, JPATH_ADMINISTRATOR, $lang->getDefault(), true);
             $lang->load($filename, JPATH_ADMINISTRATOR, null, true);
             echo $parameters->render();
             //echo '<input type="hidden" value="'.$this->plugin->element.'" name="custom_value">';
             jExit();
         }
     }
     jExit();
 }
开发者ID:Arturogcalleja,项目名称:herbolario,代码行数:34,代码来源:view.json.php

示例4: display

 function display($tpl = null)
 {
     $db = JFactory::getDBO();
     if ($field = vRequest::getVar('field')) {
         if (strpos($field, 'plugin') !== false) {
             JForm::addFieldPath(JPATH_VM_ADMINISTRATOR . DS . 'fields');
             $table = '#__extensions';
             $field = substr($field, 6);
             $q = 'SELECT `params`,`element`,`type` FROM `' . $table . '` WHERE `element` = "' . $field . '"';
             $db->setQuery($q);
             $this->userField = $db->loadObject();
             //$this->userField->element = substr($this->userField->type, 6);
             if (!class_exists('vmPlugin')) {
                 require JPATH_VM_PLUGINS . DS . 'vmplugin.php';
             }
             vmPlugin::loadJLang('plg_vmuserfield_' . $this->userField->element, 'vmuserfield', $this->userField->element);
             $path = JPATH_ROOT . DS . 'plugins' . DS . 'vmuserfield' . DS . $this->userField->element . DS . $this->userField->element . '.xml';
             // Get the payment XML.
             $formFile = JPath::clean($path);
             if (file_exists($formFile)) {
                 if (!class_exists('VmConfig')) {
                     require JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php';
                 }
                 if (!class_exists('VmTable')) {
                     require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'vmtable.php';
                 }
                 $this->userField->form = JForm::getInstance($this->userField->element, $formFile, array(), false, '//vmconfig | //config[not(//vmconfig)]');
                 $this->userField->params = new stdClass();
                 $varsToPush = vmPlugin::getVarsToPushByXML($formFile, 'customForm');
                 /*
                 					$this->userField->params->userfield_params = $this->userField->params;
                 					VmTable::bindParameterable($this->userField->params,'userfield_params',$varsToPush);*/
                 if (empty($this->userField->userfield_params)) {
                     $this->userField->userfield_params = '';
                 }
                 $this->userField->params->userfield_params = $this->userField->userfield_params;
                 VmTable::bindParameterable($this->userField->params, 'userfield_params', $varsToPush);
                 $this->userField->form->bind($this->userField);
             } else {
                 $this->userField->form = false;
                 vmdebug('renderUserfieldPlugin could not find xml for ' . $this->userField->type . ' at ' . $path);
             }
             //vmdebug('renderUserfieldPlugin ',$this->userField->form);
             if ($this->userField->form) {
                 $form = $this->userField->form;
                 ob_start();
                 include JPATH_VM_ADMINISTRATOR . DS . 'fields' . DS . 'formrenderer.php';
                 $body = ob_get_contents();
                 ob_end_clean();
                 echo $body;
             }
         }
     }
     jExit();
 }
开发者ID:lenard112,项目名称:cms,代码行数:55,代码来源:view.json.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $stateModel = tmsModel::getModel('state');
     $states = array();
     //retrieving countries id
     $countries = vRequest::getString('virtuemart_country_id');
     $countries = explode(',', $countries);
     foreach ($countries as $country) {
         $states[$country] = $stateModel->getStates((int) $country, true, true);
     }
     echo json_encode($states);
     jExit();
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:14,代码来源:state.php

示例6: __construct

 /**
  * Method to display the view
  *
  * @access	public
  * @author RickG, Max Milbers
  */
 public function __construct()
 {
     parent::__construct();
     $stateModel = VmModel::getModel('state');
     $states = array();
     //retrieving countries id
     $countries = JRequest::getString('virtuemart_country_id');
     $countries = explode(',', $countries);
     foreach ($countries as $country) {
         $states[$country] = $stateModel->getStates(JFilterInput::clean($country, 'INTEGER'), true);
     }
     echo json_encode($states);
     jExit();
 }
开发者ID:rubengarcia0510,项目名称:tienda,代码行数:20,代码来源:state.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     $stateModel = VmModel::getModel('state');
     $states = array();
     //retrieving countries id
     $countries = vRequest::getString('virtuemart_country_id');
     $countries = explode(',', $countries);
     foreach ($countries as $country) {
         $states[$country] = $stateModel->getStates((int) $country, true, true);
     }
     JResponse::setHeader("Content-type", "application/json");
     JResponse::sendHeaders();
     echo json_encode($states);
     jExit();
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:16,代码来源:state.php

示例8: display

 /**
  * Method to render the plugin datas
  * this is an entry point to plugin to easy renders json or html
  *
  *
  * @access    public
  */
 function display($cachable = false, $urlparams = false)
 {
     if (!($type = vRequest::getCmd('vmtype', NULL))) {
         $type = vRequest::getCmd('type', 'vmcustom');
     }
     $typeWhiteList = array('vmcustom', 'vmcalculation', 'vmuserfield', 'vmpayment', 'vmshipment');
     if (!in_array($type, $typeWhiteList)) {
         return FALSE;
     }
     $name = vRequest::getCmd('name', 'none');
     $nameBlackList = array('plgVmValidateCouponCode', 'plgVmRemoveCoupon', 'none');
     if (in_array($name, $nameBlackList)) {
         echo 'You got logged';
         return FALSE;
     }
     JPluginHelper::importPlugin($type, $name);
     $dispatcher = JDispatcher::getInstance();
     // if you want only one render simple in the plugin use jExit();
     // or $render is an array of code to echo as html or json Objects!
     $render = NULL;
     $dispatcher->trigger('plgVmOnSelfCallFE', array($type, $name, &$render));
     if ($render) {
         // Get the document object.
         $document = JFactory::getDocument();
         if (vRequest::getCmd('cache') == 'no') {
             JResponse::setHeader('Cache-Control', 'no-cache, must-revalidate');
             JResponse::setHeader('Expires', 'Mon, 6 Jul 2000 10:00:00 GMT');
         }
         $format = vRequest::getCmd('format', 'json');
         if ($format == 'json') {
             $document->setMimeEncoding('application/json');
             // Change the suggested filename.
             JResponse::setHeader('Content-Disposition', 'attachment;filename="' . $type . '.json"');
             JResponse::setHeader("Content-type", "application/json");
             JResponse::sendHeaders();
             echo json_encode($render);
             jExit();
         } else {
             echo $render;
             jExit();
         }
     } else {
     }
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:51,代码来源:plugin.php

示例9: display

 function display($tpl = null)
 {
     $db = JFactory::getDBO();
     if ($virtuemart_media_id = JRequest::getInt('virtuemart_media_id')) {
         //$db = JFactory::getDBO();
         $query = 'SELECT `file_url`,`file_title` FROM `#__virtuemart_medias` where `virtuemart_media_id`=' . $virtuemart_media_id;
         $db->setQuery($query);
         $json = $db->loadObject();
         if (isset($json->file_url)) {
             $json->file_url = JURI::root() . $json->file_url;
             $json->msg = 'OK';
             echo json_encode($json);
         } else {
             $json->msg = '<b>' . JText::_('COM_VIRTUEMART_NO_IMAGE_SET') . '</b>';
             echo json_encode($json);
         }
     } elseif ($custom_jplugin_id = JRequest::getInt('custom_jplugin_id')) {
         if (JVM_VERSION === 1) {
             $table = '#__plugins';
             $ext_id = 'id';
         } else {
             $table = '#__extensions';
             $ext_id = 'extension_id';
         }
         $q = 'SELECT `params`,`element` FROM `' . $table . '` WHERE `' . $ext_id . '` = "' . $custom_jplugin_id . '"';
         $db->setQuery($q);
         $this->plugin = $db->loadObject();
         if (!class_exists('vmParameters')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'parameterparser.php';
         }
         $parameters = new vmParameters($this->plugin->params, $this->plugin->element, 'plugin', 'vmcustom');
         if (!class_exists('vmPlugin')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'plugins' . DS . 'vmplugin.php';
         }
         $filename = 'plg_vmcustom_' . $this->plugin->element;
         vmPlugin::loadJLang($filename, 'vmcustom', $this->plugin->element);
         echo $parameters->render();
         echo '<input type="hidden" value="' . $this->plugin->element . '" name="custom_value">';
         jExit();
     }
     jExit();
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:42,代码来源:view.json.php

示例10: saveJS

 function saveJS()
 {
     $data = JRequest::get('get');
     JRequest::setVar($data['token'], '1', 'post');
     JRequest::checkToken() or jexit('Invalid Token save');
     $model = VmModel::getModel($this->_cname);
     $id = $model->store($data);
     $errors = $model->getErrors();
     if (empty($errors)) {
         $msg = JText::sprintf('COM_VIRTUEMART_STRING_SAVED', $this->mainLangKey);
         $type = 'save';
     } else {
         $type = 'error';
     }
     foreach ($errors as $error) {
         $msg = $error . '<br />';
     }
     $json['msg'] = $msg;
     if ($id) {
         $json['product_id'] = $id;
         $json['ok'] = 1;
     } else {
         $json['ok'] = 0;
     }
     echo json_encode($json);
     jExit();
 }
开发者ID:Roma48,项目名称:abazherka_old,代码行数:27,代码来源:product.php

示例11: saveJS

 function saveJS()
 {
     vRequest::vmCheckToken();
     $model = VmModel::getModel($this->_cname);
     $data = vRequest::getRequest();
     $id = $model->store($data);
     $errors = $model->getErrors();
     if (empty($errors)) {
         $msg = vmText::sprintf('COM_VIRTUEMART_STRING_SAVED', $this->mainLangKey);
         $type = 'message';
     } else {
         $type = 'error';
     }
     foreach ($errors as $error) {
         $msg = $error . '<br />';
     }
     $json['msg'] = $msg;
     if ($id) {
         $json['product_id'] = $id;
         $json['ok'] = 1;
     } else {
         $json['ok'] = 0;
     }
     echo json_encode($json);
     jExit();
 }
开发者ID:lenard112,项目名称:cms,代码行数:26,代码来源:product.php

示例12: addJS

 /**
  * Add the product to the cart, with JS
  *
  * @author Max Milbers
  * @access public
  */
 public function addJS()
 {
     //maybe we should use $mainframe->close(); or jexit();instead of die;
     /* Load the cart helper */
     //require_once(JPATH_VM_SITE.DS.'helpers'.DS.'cart.php');
     $this->json = null;
     $cart = VirtueMartCart::getCart(false);
     if ($cart) {
         // Get a continue link */
         $virtuemart_category_id = shopFunctionsF::getLastVisitedCategoryId();
         if ($virtuemart_category_id) {
             $categoryLink = '&view=category&virtuemart_category_id=' . $virtuemart_category_id;
         } else {
             $categoryLink = '';
         }
         $continue_link = JRoute::_('index.php?option=com_virtuemart' . $categoryLink);
         $virtuemart_product_ids = JRequest::getVar('virtuemart_product_id', array(), 'default', 'array');
         $errorMsg = JText::_('COM_VIRTUEMART_CART_PRODUCT_ADDED');
         if ($cart->add($virtuemart_product_ids, $errorMsg)) {
             $this->json->msg = '<a class="continue" href="' . $continue_link . '" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
             $this->json->msg .= '<a class="showcart floatright" href="' . JRoute::_("index.php?option=com_virtuemart&view=cart") . '">' . JText::_('COM_VIRTUEMART_CART_SHOW_MODAL') . '</a>';
             if ($errorMsg) {
                 $this->json->msg .= '<div>' . $errorMsg . '</div>';
             }
             $this->json->stat = '1';
         } else {
             // $this->json->msg = '<p>' . $cart->getError() . '</p>';
             $this->json->msg = '<a class="continue" href="' . $continue_link . '" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
             $this->json->msg .= '<div>' . $errorMsg . '</div>';
             $this->json->stat = '2';
         }
     } else {
         $this->json->msg = '<a href="' . JRoute::_('index.php?option=com_virtuemart') . '" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
         $this->json->msg .= '<p>' . JText::_('COM_VIRTUEMART_MINICART_ERROR') . '</p>';
         $this->json->stat = '0';
     }
     echo json_encode($this->json);
     jExit();
 }
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:45,代码来源:cart.php

示例13: paste

 /**
  * Paste the table  in json format
  *
  */
 public function paste()
 {
     // TODO Test user ?
     $json = array();
     $json['fields'] = 'error';
     $json['msg'] = 'Invalid Token';
     $json['structure'] = 'empty';
     if (!vRequest::vmCheckToken(-1)) {
         echo json_encode($json);
         jexit();
     }
     $lang = vRequest::getvar('lg');
     $langs = VmConfig::get('active_languages', array());
     $language = JFactory::getLanguage();
     if (!in_array($lang, $langs)) {
         $json['msg'] = 'Invalid language ! ' . $lang;
         $json['langs'] = $langs;
         echo json_encode($json);
         jexit();
     }
     $lang = strtolower($lang);
     // Remove tag if defaut or
     // if ($language->getDefault() == $lang ) $dblang ='';
     $dblang = strtr($lang, '-', '_');
     VmConfig::$vmlang = $dblang;
     $id = vRequest::getInt('id', 0);
     $viewKey = vRequest::getCmd('editView');
     // TODO temp trick for vendor
     if ($viewKey == 'vendor') {
         $id = 1;
     }
     $tables = array('category' => 'categories', 'product' => 'products', 'manufacturer' => 'manufacturers', 'manufacturercategories' => 'manufacturercategories', 'vendor' => 'vendors', 'paymentmethod' => 'paymentmethods', 'shipmentmethod' => 'shipmentmethods');
     if (!array_key_exists($viewKey, $tables)) {
         $json['msg'] = "Invalid view " . $viewKey;
         echo json_encode($json);
         jExit();
     }
     $tableName = '#__virtuemart_' . $tables[$viewKey] . '_' . $dblang;
     $db = JFactory::getDBO();
     $q = 'select * FROM `' . $tableName . '` where `virtuemart_' . $viewKey . '_id` =' . $id;
     $db->setQuery($q);
     $m = VmModel::getModel('coupon');
     $table = $m->getTable($tables[$viewKey]);
     $table->load($id);
     $json['fields'] = $table->loadFieldValues();
     //if ($json['fields'] = $db->loadAssoc()) {
     if ($table->getLoaded()) {
         $json['structure'] = 'filled';
         $json['msg'] = vmText::_('COM_VIRTUEMART_SELECTED_LANG') . ':' . $lang;
     } else {
         $json['structure'] = 'empty';
         $db->setQuery('SHOW COLUMNS FROM ' . $tableName);
         $tableDescribe = $db->loadAssocList();
         array_shift($tableDescribe);
         $fields = array();
         foreach ($tableDescribe as $key => $val) {
             $fields[$val['Field']] = $val['Field'];
         }
         $json['fields'] = $fields;
         $json['msg'] = vmText::sprintf('COM_VIRTUEMART_LANG_IS_EMPTY', $lang, vmText::_('COM_VIRTUEMART_' . strtoupper($viewKey)));
     }
     echo json_encode($json);
     jExit();
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:68,代码来源:translate.php

示例14: defined

 * This file is executed during install/upgrade and uninstall
 *
 * @author Patrick Kohl, Max Milbers, Valérie Isaksen
 * @package VirtueMart
 */
defined('DS') or define('DS', DIRECTORY_SEPARATOR);
//Update Tables
if (!class_exists('tsmConfig')) {
    if (file_exists(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php')) {
        require JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php';
    } else {
        jExit('Install the tsmart Core first ');
    }
}
if (!method_exists('vRequest', 'vmSpecialChars')) {
    jExit('Install the tsmart Core first ');
}
$max_execution_time = ini_get('max_execution_time');
if ((int) $max_execution_time < 120) {
    @ini_set('max_execution_time', '120');
}
$memory_limit = (int) substr(ini_get('memory_limit'), 0, -1);
if ($memory_limit < 128) {
    @ini_set('memory_limit', '128M');
}
// hack to prevent defining these twice in 1.6 installation
if (!defined('_VM_AIO_SCRIPT_INCLUDED')) {
    define('_VM_AIO_SCRIPT_INCLUDED', TRUE);
    class com_virtuemart_allinoneInstallerScript
    {
        public function preflight()
开发者ID:cuongnd,项目名称:etravelservice,代码行数:31,代码来源:script.vmallinone.php

示例15: keepalive

 public function keepalive()
 {
     jExit();
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:4,代码来源:virtuemart.php


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