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


PHP Zend_Json::encode方法代码示例

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


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

示例1: getagentpermissionsAction

 public function getagentpermissionsAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         if (!$this->getRequest()->isXmlHttpRequest()) {
             $this->view->msg = 'Not Ajax Request';
             $this->_forward('error', 'error');
         } else {
             $filterChain = new Zend_Filter();
             $filterChain->addFilter(new Zend_Filter_Digits())->addFilter(new Zend_Filter_StripTags());
             $zoneId = $filterChain->filter($_POST['ZONE_ID']);
             $contextId = $filterChain->filter($_POST['CONTEXT_ID']);
             $agentId = $filterChain->filter($_POST['AGENT_ID']);
             $permissions = Permission::getAllAgentPermissions($agentId, $zoneId, $contextId);
             if (count($permissions) > 0) {
                 $json = Zend_Json::encode($permissions);
                 $this->view->json = $json;
             }
             $this->render('ajaxsuccessjson');
         }
     } else {
         if (!$this->getRequest()->isXmlHttpRequest()) {
             $this->view->msg = 'Not Ajax Request';
             $this->_forward('error', 'error');
         } else {
             $this->view->msg = 'Invalid User';
             $this->_forward('error', 'error');
         }
     }
 }
开发者ID:Koulio,项目名称:OpenZIS,代码行数:30,代码来源:AgentaccessController.php

示例2: vtEditExpressions

function vtEditExpressions($adb, $appStrings, $current_language, $theme, $formodule = '')
{
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    $smarty = new vtigerCRM_Smarty();
    $smarty->assign('APP', $appStrings);
    $mod = array_merge(return_module_language($current_language, 'FieldFormulas'), return_module_language($current_language, 'Settings'));
    $jsStrings = array('NEED_TO_ADD_A' => $mod['NEED_TO_ADD_A'], 'CUSTOM_FIELD' => $mod['LBL_CUSTOM_FIELD'], 'LBL_USE_FUNCTION_DASHDASH' => $mod['LBL_USE_FUNCTION_DASHDASH'], 'LBL_USE_FIELD_VALUE_DASHDASH' => $mod['LBL_USE_FIELD_VALUE_DASHDASH'], 'LBL_DELETE_EXPRESSION_CONFIRM' => $mod['LBL_DELETE_EXPRESSION_CONFIRM']);
    $smarty->assign("JS_STRINGS", Zend_Json::encode($jsStrings));
    $smarty->assign("MOD", $mod);
    $smarty->assign("THEME", $theme);
    $smarty->assign("IMAGE_PATH", $image_path);
    $smarty->assign("MODULE_NAME", 'FieldFormulas');
    $smarty->assign("PAGE_NAME", 'LBL_FIELDFORMULAS');
    $smarty->assign("PAGE_TITLE", 'LBL_FIELDFORMULAS');
    $smarty->assign("PAGE_DESC", 'LBL_FIELDFORMULAS_DESCRIPTION');
    $smarty->assign("FORMODULE", $formodule);
    if (file_exists("modules/{$formodule}/{$formodule}.php")) {
        $focus = CRMEntity::getInstance($formodule);
        $validationArray = split_validationdataArray(getDBValidationData($focus->tab_name, getTabid($formodule)));
        $smarty->assign('VALIDATION_DATA_FIELDNAME', $validationArray['fieldname']);
        $smarty->assign('VALIDATION_DATA_FIELDDATATYPE', $validationArray['datatype']);
        $smarty->assign('VALIDATION_DATA_FIELDLABEL', $validationArray['fieldlabel']);
    }
    $smarty->display(vtlib_getModuleTemplate('FieldFormulas', 'EditExpressions.tpl'));
}
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:26,代码来源:editexpressions.php

示例3: datePicker

 /**
  * Create a jQuery UI Widget Date Picker
  *
  * @link   http://docs.jquery.com/UI/Datepicker
  * @param  string $id
  * @param  string $value
  * @param  array  $params jQuery Widget Parameters
  * @param  array  $attribs HTML Element Attributes
  * @return string
  */
 public function datePicker($id, $value = null, array $params = array(), array $attribs = array())
 {
     $attribs = $this->_prepareAttributes($id, $value, $attribs);
     //
     // Prepare params
     //
     if (!isset($params['dateFormat']) && Zend_Registry::isRegistered('Zend_Locale')) {
         $params['dateFormat'] = $this->_resolveLocaleToDatePickerFormat();
     }
     // TODO: Allow translation of DatePicker Text Values to get this action from client to server
     if (count($params) > 0) {
         /**
          * @see Zend_Json
          */
         require_once "Zend/Json.php";
         $params = Zend_Json::encode($params);
     } else {
         $params = "{}";
     }
     $js = sprintf('%s("#%s").datepicker(%s);', ZendX_JQuery_View_Helper_JQuery::getJQueryHandler(), $attribs['id'], $params);
     //
     // Add DatePicker callup to onLoad Stack
     //
     $this->jquery->addOnLoad($js);
     return $this->view->formText($id, $value, $attribs);
 }
开发者ID:omusico,项目名称:wildfire_php,代码行数:36,代码来源:DatePicker.php

示例4: statisticsAction

 public function statisticsAction()
 {
     $request = $this->getRequest()->getParams();
     $option = isset($request['option']) ? $request['option'] : 'data';
     if ($option == 'data') {
         $doc_type = isset($request['doc_type']) && $request['doc_type'] != '' ? $request['doc_type'] : null;
         $transaction_type = isset($request['transaction_type']) && $request['transaction_type'] != '' ? $request['transaction_type'] : null;
     } else {
         $doc_type = isset($request['doc_type']) && $request['doc_type'] != '' ? json_encode(explode(',', $request['doc_type'])) : null;
         $transaction_type = isset($request['transaction_type']) && $request['transaction_type'] != '' ? json_encode(explode(',', $request['transaction_type'])) : null;
     }
     $warehouse_type = isset($request['warehouse_type']) && $request['warehouse_type'] != 'null' ? $request['warehouse_type'] : null;
     $warehouse = isset($request['warehouse']) && $request['warehouse'] != 'null' ? $request['warehouse'] : null;
     $key = isset($request['key']) ? $request['key'] : '';
     $date_from = isset($request['date_from']) ? $request['date_from'] : date('Y-m-01');
     $date_to = isset($request['date_to']) ? $request['date_to'] : date('Y-m-t');
     $page = isset($request['page']) ? $request['page'] : 1;
     $limit = isset($request['limit']) ? $request['limit'] : 0;
     $stock = new Erp_Model_Stock_Stock();
     // 查询条件
     $condition = array('warehouse_type' => $warehouse_type, 'warehouse' => $warehouse, 'doc_type' => $doc_type, 'transaction_type' => $transaction_type, 'key' => $key, 'date_from' => $date_from, 'date_to' => $date_to, 'page' => $page, 'limit' => $limit, 'type' => $option);
     $data = $stock->getStatisticsData($condition);
     if ($option == 'csv') {
         $this->view->layout()->disableLayout();
         $this->_helper->viewRenderer->setNoRender(true);
         $h = new Application_Model_Helpers();
         $h->exportCsv($data, '库存交易统计');
     } else {
         echo Zend_Json::encode($data);
     }
     exit;
 }
开发者ID:xindalu,项目名称:evolve,代码行数:32,代码来源:StatisticsController.php

示例5: _afterToHtml

 protected function _afterToHtml($html)
 {
     $html = parent::_afterToHtml($html);
     if ('product.info.options.configurable' == $this->getNameInLayout() && 'true' != (string) Mage::getConfig()->getNode('modules/Amasty_Stockstatus/active')) {
         $allProducts = $this->getProduct()->getTypeInstance(true)->getUsedProducts(null, $this->getProduct());
         $_attributes = $this->getProduct()->getTypeInstance(true)->getConfigurableAttributes($this->getProduct());
         foreach ($allProducts as $product) {
             $key = array();
             foreach ($_attributes as $attribute) {
                 $key[] = $product->getData($attribute->getData('product_attribute')->getData('attribute_code'));
             }
             $stockStatus = '';
             $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product);
             if (!$product->isInStock()) {
                 $stockStatus = Mage::helper('amxnotif')->__('Out of Stock');
             }
             if ($key) {
                 $aStockStatus[implode(',', $key)] = array('is_in_stock' => $product->isSaleable(), 'custom_status' => $stockStatus, 'is_qnt_0' => (int) ($product->isInStock() && $stockItem->getData('qty') <= 0), 'product_id' => $product->getId(), 'stockalert' => Mage::helper('amxnotif')->getStockAlert($product, $this->helper('customer')->isLoggedIn()));
             }
         }
         foreach ($aStockStatus as $k => $v) {
             if (!$v['is_in_stock'] && !$v['custom_status']) {
                 $v['custom_status'] = Mage::helper('amxnotif')->__('Out of Stock');
                 $aStockStatus[$k] = $v;
             }
         }
         $html = '<script type="text/javascript">var stStatus = new StockStatus(' . Zend_Json::encode($aStockStatus) . ');</script>' . $html;
     }
     return $html;
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:30,代码来源:Configurable.php

示例6: viewAction

 public function viewAction()
 {
     // Sociel Gaming
     $app = $this->getApplication();
     $option = $this->getCurrentOptionValue();
     $current_game = new Socialgaming_Model_Game();
     $current_game->findCurrent($app->getId());
     if (!$current_game->getId()) {
         $current_game->findDefault();
     }
     list($start, $end) = $current_game->getFromDateToDate();
     $log = new LoyaltyCard_Model_Customer_Log();
     $customers = $log->getBestCustomers($app->getId(), $start->toString('y-MM-dd HH:mm:ss'), $end->toString('y-MM-dd HH:mm:ss'), false);
     $team_leader = $customers->current();
     $customers->removeCurrent();
     $this->loadPartials($this->getFullActionName('_') . '_l' . $this->_layout_id, false);
     $this->getLayout()->getPartial('content')->setCurrentGame($current_game)->setTeamLeader($team_leader)->setCustomers($customers);
     $html = array('html' => $this->getLayout()->render());
     if ($url = $option->getBackgroundImageUrl()) {
         $html['background_image_url'] = $url;
     }
     $html['use_homepage_background_image'] = (int) $option->getUseHomepageBackgroundImage() && !$option->getHasBackgroundImage();
     $html['title'] = $option->getTabbarName();
     $this->getLayout()->setHtml(Zend_Json::encode($html));
 }
开发者ID:bklein01,项目名称:SiberianCMS,代码行数:25,代码来源:MobileController.php

示例7: connectAction

 /**
  * Initial connect function to get the user details and also to check the user tocken
  */
 public function connectAction()
 {
     $this->_getSession()->unsSignup();
     $token = $this->getRequest()->getParam('token');
     $host = $this->getRequest()->getParam('host');
     //Load the user object with the bc-token
     $user = App_Main::getModel('stages/user')->load($token, 'bc_auth_token');
     //login and redirect to homepage if the user is already registered
     if ($user->getId()) {
         $user->setSessionUser($user);
         echo Zend_Json::encode(array('redirect' => App_Main::getUrl('')));
         return;
     }
     //Get the Basecamp connect object
     $bcConnect = new Connect_Basecamp($host, $token, 'X', 'xml');
     $userXml = $bcConnect->getMe();
     if (!empty($userXml['body']) && $userXml['status'] == '200 OK') {
         $userArray = App_Main::getHelper('stages')->XMLToArray($userXml['body']);
         $return = array('success' => 1, 'username' => $userArray['user-name'], 'firstname' => $userArray['first-name'], 'lastname' => $userArray['last-name'], 'avatar' => $userArray['avatar-url'], 'token' => $userArray['token']);
         $signUp = App_Main::getModel('core/object');
         $signUp->setMode('bc_token_connect');
         $signUp->setToken($token);
         $signUp->setHost($host);
         $this->_getSession()->setSignup($signUp);
     } else {
         $return = array('success' => 0);
     }
     echo Zend_Json::encode($return);
 }
开发者ID:hettema,项目名称:Stages,代码行数:32,代码来源:BasecampController.php

示例8: vtGetExpressionListJson

function vtGetExpressionListJson($adb, $request)
{
    $moduleName = $request['modulename'];
    $ee = new VTModuleExpressionsManager($adb);
    $arr = $ee->expressionsForModule($moduleName);
    echo Zend_Json::encode($arr);
}
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:7,代码来源:getexpressionlistjson.php

示例9: varsToListAction

 /**
  * Add merge vars to list
  */
 public function varsToListAction()
 {
     $listId = $this->getRequest()->getPost('list_id', null);
     if ($listId) {
         $api = Mage::getModel('monkey/api');
         $e = explode('&', $this->getRequest()->getPost('merge_vars'));
         $mergeVars = array();
         foreach ($e as $val) {
             $m = explode('=', $val);
             $mergeVars[$m[0]] = $m[1];
         }
         $options = array();
         foreach ($mergeVars as $tag => $name) {
             //Date for some fields, format is "MM/DD/YYYY"
             if ($tag == 'PTSSPENT' || $tag == 'PTSEARN' || $tag == 'PTSEXP') {
                 $options['field_type'] = 'date';
             } else {
                 //We add a new mergevar for INT points.
                 if ($tag == 'PTS') {
                     $options = array('field_type' => 'number');
                     $api->listMergeVarAdd($listId, "POINTS", "Points", $options);
                     $options = array();
                 }
             }
             $api->listMergeVarAdd($listId, $tag, $name, $options);
             $options = array();
         }
     }
     $this->getResponse()->setBody(Zend_Json::encode(array()));
 }
开发者ID:4DallasC,项目名称:magemonkey,代码行数:33,代码来源:MageMonkeyController.php

示例10: fetchEmailsInFolderAction

 public function fetchEmailsInFolderAction()
 {
     $tblQueue = new Pandamp_Modules_Misc_Email_Model_Queue();
     $rowset = $tblQueue->fetchAll();
     $a = array();
     $a['totalCount'] = count($rowset);
     $i = 0;
     if ($a['totalCount'] != 0) {
         foreach ($rowset as $row) {
             $a['email'][$i]['qid'] = $row->newsletterQID;
             $a['email'][$i]['sender'] = $row->sender;
             $a['email'][$i]['recepientMail'] = $row->recepientMail;
             $a['email'][$i]['recepientName'] = $row->recepientName;
             $a['email'][$i]['subject'] = $row->subject;
             $a['email'][$i]['SendDate'] = Pandamp_Lib_Formater::get_date($row->SendDate);
             $i++;
         }
     }
     if ($a['totalCount'] == 0) {
         $a['email'][0]['qid'] = '';
         $a['email'][0]['sender'] = '';
         $a['email'][0]['recepientMail'] = '';
         $a['email'][0]['recepientName'] = '';
         $a['email'][0]['subject'] = '';
         $a['email'][0]['SendDate'] = '';
     }
     echo Zend_Json::encode($a);
 }
开发者ID:hukumonline,项目名称:quart80,代码行数:28,代码来源:EmailController.php

示例11: _prepareForm

 /**
  * Add fields to form and create template info form
  *
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     $fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('adminhtml')->__('Template Information'), 'class' => 'fieldset-wide'));
     $templateId = $this->getEmailTemplate()->getId();
     if ($templateId) {
         $fieldset->addField('used_currently_for', 'label', array('label' => Mage::helper('adminhtml')->__('Used Currently For'), 'container_id' => 'used_currently_for', 'after_element_html' => '<script type="text/javascript">' . (!$this->getEmailTemplate()->getSystemConfigPathsWhereUsedCurrently() ? '$(\'' . 'used_currently_for' . '\').hide(); ' : '') . '</script>'));
     }
     if (!$templateId) {
         $fieldset->addField('used_default_for', 'label', array('label' => Mage::helper('adminhtml')->__('Used as Default For'), 'container_id' => 'used_default_for', 'after_element_html' => '<script type="text/javascript">' . (!(bool) $this->getEmailTemplate()->getOrigTemplateCode() ? '$(\'' . 'used_default_for' . '\').hide(); ' : '') . '</script>'));
     }
     $fieldset->addField('template_code', 'text', array('name' => 'template_code', 'label' => Mage::helper('adminhtml')->__('Template Name'), 'required' => true));
     $fieldset->addField('template_subject', 'text', array('name' => 'template_subject', 'label' => Mage::helper('adminhtml')->__('Template Subject'), 'required' => true));
     $fieldset->addField('orig_template_variables', 'hidden', array('name' => 'orig_template_variables'));
     $fieldset->addField('variables', 'hidden', array('name' => 'variables', 'value' => Zend_Json::encode($this->getVariables())));
     $fieldset->addField('template_variables', 'hidden', array('name' => 'template_variables'));
     $insertVariableButton = $this->getLayout()->createBlock('adminhtml/widget_button', '', array('type' => 'button', 'label' => Mage::helper('adminhtml')->__('Insert Variable...'), 'onclick' => 'templateControl.openVariableChooser();return false;'));
     $fieldset->addField('insert_variable', 'note', array('text' => $insertVariableButton->toHtml()));
     $fieldset->addField('template_text', 'textarea', array('name' => 'template_text', 'label' => Mage::helper('adminhtml')->__('Template Content'), 'title' => Mage::helper('adminhtml')->__('Template Content'), 'required' => true, 'style' => 'height:24em;'));
     if (!$this->getEmailTemplate()->isPlain()) {
         $fieldset->addField('template_styles', 'textarea', array('name' => 'template_styles', 'label' => Mage::helper('adminhtml')->__('Template Styles'), 'container_id' => 'field_template_styles'));
     }
     if ($templateId) {
         $form->addValues($this->getEmailTemplate()->getData());
     }
     if ($values = Mage::getSingleton('adminhtml/session')->getData('email_template_form_data', true)) {
         $form->setValues($values);
     }
     $this->setForm($form);
     return parent::_prepareForm();
 }
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:36,代码来源:Form.php

示例12: if

<?php if ($_valid && !is_callable('content_56087a12baeb7')) {function content_56087a12baeb7($_smarty_tpl) {?>
<div class="container-fluid"><div class="contents row-fluid"><?php $_smarty_tpl->tpl_vars['WIDTHTYPE'] = new Smarty_variable($_smarty_tpl->tpl_vars['CURRENT_USER_MODEL']->value->get('rowheight'), null, 0);?><form id="OutgoingServerForm" class="form-horizontal" data-detail-url="<?php echo $_smarty_tpl->tpl_vars['MODEL']->value->getDetailViewUrl();?>
" method="POST"><div class="widget_header row-fluid"><div class="span8"><h3><?php echo vtranslate('LBL_OUTGOING_SERVER',$_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);?>
</h3>&nbsp;<?php echo vtranslate('LBL_OUTGOING_SERVER_DESC',$_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);?>
</div><div class="span4 btn-toolbar"><div class="pull-right"><button class="btn btn-success saveButton" type="submit" title="<?php echo vtranslate('LBL_SAVE',$_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);?>
"><strong><?php echo vtranslate('LBL_SAVE',$_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);?>
</strong></button><a type="reset" class="cancelLink" title="<?php echo vtranslate('LBL_CANCEL',$_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);?>
"><?php echo vtranslate('LBL_CANCEL',$_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);?>
</a></div></div></div><hr><input type="hidden" name="default" value="false" /><input type="hidden" name="server_port" value="0" /><input type="hidden" name="server_type" value="email" /><input type="hidden" name="id" value="<?php echo $_smarty_tpl->tpl_vars['MODEL']->value->get('id');?>
" /><div class="row-fluid hide errorMessage"><div class="alert alert-error"><?php echo vtranslate('LBL_TESTMAILSTATUS',$_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);?>
<strong><?php echo vtranslate('LBL_MAILSENDERROR',$_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);?>
</strong></div></div><table class="table table-bordered table-condensed themeTableColor"><thead><tr class="blockHeader"><th colspan="2" class="<?php echo $_smarty_tpl->tpl_vars['WIDTHTYPE']->value;?>
"><?php echo vtranslate('LBL_MAIL_SERVER_SMTP',$_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);?>
</th></tr></thead><tbody><tr><td width="20%" class="<?php echo $_smarty_tpl->tpl_vars['WIDTHTYPE']->value;?>
"><label class="muted pull-right marginRight10px"><span class="redColor">*</span><?php echo vtranslate('LBL_SERVER_NAME',$_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);?>
</label></td><td class="<?php echo $_smarty_tpl->tpl_vars['WIDTHTYPE']->value;?>
" style="border-left: none;"><input type="text" name="server" data-validation-engine='validate[required]' value="<?php echo $_smarty_tpl->tpl_vars['MODEL']->value->get('server');?>
" /></td></tr><tr><td class="<?php echo $_smarty_tpl->tpl_vars['WIDTHTYPE']->value;?>
"><label class="muted pull-right marginRight10px"><?php echo vtranslate('LBL_USER_NAME',$_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);?>
</label></td><td class="<?php echo $_smarty_tpl->tpl_vars['WIDTHTYPE']->value;?>
" style="border-left: none;"><input type="text" name="server_username" value="<?php echo $_smarty_tpl->tpl_vars['MODEL']->value->get('server_username');?>
"</td></tr><tr><td class="<?php echo $_smarty_tpl->tpl_vars['WIDTHTYPE']->value;?>
"><label class="muted pull-right marginRight10px"><?php echo vtranslate('LBL_PASSWORD',$_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);?>
</label></td><td class="<?php echo $_smarty_tpl->tpl_vars['WIDTHTYPE']->value;?>
" style="border-left: none;"><input type="password" name="server_password" value="<?php echo $_smarty_tpl->tpl_vars['MODEL']->value->get('server_password');?>
"</td></tr><tr><td class="<?php echo $_smarty_tpl->tpl_vars['WIDTHTYPE']->value;?>
"><label class="muted pull-right marginRight10px"><?php echo vtranslate('LBL_FROM_EMAIL',$_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);?>
</label></td><td class="<?php echo $_smarty_tpl->tpl_vars['WIDTHTYPE']->value;?>
" style="border-left: none;"><input type="text" name="from_email_field" data-validation-engine="validate[funcCall[Vtiger_Base_Validator_Js.invokeValidation]]" data-validator='<?php echo Zend_Json::encode(array(array('name'=>'Email')));?>
' value="<?php echo $_smarty_tpl->tpl_vars['MODEL']->value->get('from_email_field');?>
"</td></tr><tr><td class="<?php echo $_smarty_tpl->tpl_vars['WIDTHTYPE']->value;?>
"><label class="muted pull-right marginRight10px"><?php echo vtranslate('LBL_REQUIRES_AUTHENTICATION',$_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);?>
</label></td><td class="<?php echo $_smarty_tpl->tpl_vars['WIDTHTYPE']->value;?>
" style="border-left: none;"><input type="checkbox" name="smtp_auth" <?php if ($_smarty_tpl->tpl_vars['MODEL']->value->isSmtpAuthEnabled()){?>checked<?php }?>/></td></tr></tbody></table><br><div class="alert alert-info"><?php echo vtranslate('LBL_OUTGOING_SERVER_NOTE',$_smarty_tpl->tpl_vars['QUALIFIED_MODULE']->value);?>
</div></form></div></div><?php }} ?>
开发者ID:jeremyevans6,项目名称:kulturedTiger-,代码行数:35,代码来源:89e01280fb7afb2881db12526409e5f277603f36.file.OutgoingServerEdit.tpl.php

示例13: calculationSettingsChangeAction

 public function calculationSettingsChangeAction()
 {
     $this->getHelper('viewRenderer')->setNoRender();
     $request = $this->getRequest();
     if ($request->isPost()) {
         $post = $request->getPost();
         if (!isset($post['changeSet']) || empty($post['changeSet'])) {
             $this->ajaxException("Nieprawidłowa wartość parametrów");
             return;
         } else {
             $data = Zend_Json::decode($post['changeSet']);
             for ($i = 0; $i < $data['formsCount']; $i++) {
                 $form = $data[$i];
                 if (count($form['changes']) == 0) {
                     Logic_FormsTracker::invalidate(Zend_Session::getId() . '_' . $form['trackingName'], Zend_Auth::getInstance()->getIdentity()->id);
                 } else {
                     Logic_FormsTracker::store(Zend_Session::getId(), $form['trackingName'], $form['changes']);
                 }
             }
             echo Zend_Json::encode(array('result' => 'success', 'message' => 'ok'));
         }
     } else {
         $this->ajaxException("Bad request");
         return;
     }
 }
开发者ID:knatorski,项目名称:SMS,代码行数:26,代码来源:AjaxController.php

示例14: tradAction

 public function tradAction()
 {
     $this->disableLayout();
     $this->disableViewAutoRender();
     //		Pimcore\Model\Translation\AbstractTranslation::clearDependentCache();
     if ($admin) {
         $list = new Pimcore\Model\Translation\Admin\Listing();
     } else {
         $list = new Pimcore\Model\Translation\Website\Listing();
     }
     $list->setOrder("asc");
     $list->setOrderKey("key");
     $condition = false;
     //	$this->getGridFilterCondition();
     if ($condition) {
         $list->setCondition($condition);
     }
     $list->load();
     $translations = array();
     $translationObjects = $list->getTranslations();
     $lang = $this->language == "fr" ? "fr_FR" : $this->language;
     foreach ($translationObjects as $t) {
         if ($t->getTranslation($lang) and $t->getKey()) {
             $tab['store'][$this->language]["translation"][$t->getKey()] = $t->getTranslation($lang);
         }
         //getTranslations();
     }
     $tab['lng'] = $this->language;
     $this->getResponse()->setHeader('Content-Type', 'text/javascript')->appendBody(\Zend_Json::encode($tab));
 }
开发者ID:sgabison,项目名称:resaExpress,代码行数:30,代码来源:DefaultController.php

示例15: content_5694a5cf68a7b

    function content_5694a5cf68a7b($_smarty_tpl)
    {
        $_smarty_tpl->tpl_vars["FIELD_INFO"] = new Smarty_variable(Vtiger_Util_Helper::toSafeHTML(Zend_Json::encode($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldInfo())), null, 0);
        $_smarty_tpl->tpl_vars["SPECIAL_VALIDATOR"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getValidator(), null, 0);
        ?>
<input id="<?php 
        echo $_smarty_tpl->tpl_vars['MODULE']->value;
        ?>
_editView_fieldName_<?php 
        echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('name');
        ?>
" type="text" class="input-large" data-validation-engine="validate[<?php 
        if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->isMandatory() == true) {
            ?>
 required,<?php 
        }
        ?>
funcCall[Vtiger_Base_Validator_Js.invokeValidation]]" name="<?php 
        echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldName();
        ?>
"value="<?php 
        echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue');
        ?>
" data-fieldinfo='<?php 
        echo $_smarty_tpl->tpl_vars['FIELD_INFO']->value;
        ?>
' <?php 
        if (!empty($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value)) {
            ?>
data-validator=<?php 
            echo Zend_Json::encode($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value);
        }
        ?>
 /><?php 
    }
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:35,代码来源:1d807fb6928e3e7b7d33738ad954b370d787a974.file.Phone.tpl.php


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