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

PHP lang函数代码示例

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

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



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

示例1: tickets_handle_on_milestone_add_links

/**
 * Handle on_milestone_add_links event
 *
 * @param Milestone $milestone
 * @param User $user
 * @param array $links
 * @return null
 */
function tickets_handle_on_milestone_add_links($milestone, $user, &$links)
{
    if ($user->getProjectPermission('ticket', $milestone->getProject()) >= PROJECT_PERMISSION_CREATE) {
        $links[lang('Ticket')] = tickets_module_add_ticket_url($milestone->getProject(), array('milestone_id' => $milestone->getId()));
    }
    // if
}
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:15,代码来源:on_milestone_add_links.php


示例2: submitInfo

 public function submitInfo()
 {
     $this->load->model("settings_model");
     // Gather the values
     $values = array('nickname' => htmlspecialchars($this->input->post("nickname")), 'location' => htmlspecialchars($this->input->post("location")));
     // Change language
     if ($this->config->item('show_language_chooser')) {
         $values['language'] = $this->input->post("language");
         if (!is_dir("application/language/" . $values['language'])) {
             die("3");
         } else {
             $this->user->setLanguage($values['language']);
             $this->plugins->onSetLanguage($this->user->getId(), $values['language']);
         }
     }
     // Remove the nickname field if it wasn't changed
     if ($values['nickname'] == $this->user->getNickname()) {
         $values = array('location' => $this->input->post("location"));
     } elseif (strlen($values['nickname']) < 4 || strlen($values['nickname']) > 14 || !preg_match("/[A-Za-z0-9]*/", $values['nickname'])) {
         die(lang("nickname_error", "ucp"));
     } elseif ($this->internal_user_model->nicknameExists($values['nickname'])) {
         die("2");
     }
     if (strlen($values['location']) > 32 && !ctype_alpha($values['location'])) {
         die(lang("location_error", "ucp"));
     }
     $this->settings_model->saveSettings($values);
     $this->plugins->onSaveSettings($this->user->getId(), $values);
     die("1");
 }
开发者ID:saqar,项目名称:FusionCMS-themes-and-modules,代码行数:30,代码来源:settings.php


示例3: delAction

 /**
  * 删除
  */
 public function delAction()
 {
     $dir = base64_decode($this->get('name'));
     $name = $this->dir . $dir;
     $name = substr($name, -1) == '/' ? substr($name, 0, -1) : $name;
     if ($this->checkFileName($name)) {
         $this->adminMsg(lang('m-con-20'));
     }
     if ($this->dir == $name || $this->dir == $name . '/') {
         $this->adminMsg(lang('a-att-0'));
     }
     if (!file_exists($name)) {
         $this->adminMsg(lang('a-att-1', array('1' => $name)));
     }
     if (is_dir($name)) {
         //删除目录
         $this->delDir($name);
         $this->adminMsg(lang('a-att-2'), url('admin/attachment/index', array('dir' => base64_encode(str_replace(basename($dir), '', $dir)))), 3, 1, 1);
     }
     if (is_file($name)) {
         //删除文件
         unlink($name);
         $this->adminMsg(lang('a-att-3'), url('admin/attachment/index', array('dir' => base64_encode(str_replace(basename($dir), '', $dir)))), 3, 1, 1);
     }
 }
开发者ID:rainbow88,项目名称:hummel,代码行数:28,代码来源:AttachmentController.php


示例4: all_notification

 public function all_notification()
 {
     $data = $this->data;
     $data['menu_name']['nama'] = lang('lbl_notification');
     $data['menu_name']['keterangan'] = lang('lbl_all_notification');
     $data['datatable'] = "";
     $data['method'] = $this->method_master;
     $data['no_left_menu'] = TRUE;
     $data['this_modul'] = FALSE;
     $data['controller'] = $this->controller_notification;
     $data['notif'] = $this->model_basic->get_data($this->tbl_notifikasi, array('where_array' => array('id_group' => $data['user_level']), 'limit' => 20, 'sort_by' => 'id', 'sort' => 'DESC'))->result();
     foreach ($data['notif'] as $n) {
         $user = $this->model_basic->get_data($this->tbl_user, array('where_array' => array('id' => $n->id_user)))->row();
         $data['peg'][$n->id] = $this->model_basic->get_data($this->tbl_pegawai, array('where_array' => array('id' => $user->id_pegawai)))->row();
         $waktu = explode(' ', $n->tanggal);
         $data['waktu'][$n->id] = $this->mydate($waktu[0]) . ' ' . $waktu[1];
     }
     $data['breadcrumbs'] = array(1 => array('target' => $this->controller_notification . '/all_notification', 'nama' => $data['menu_name']['nama']));
     if (count($data['modul']) > 0) {
         $this->load->view('template/header', $data);
     } else {
         $this->load->view('template/header_no_module', $data);
     }
     $this->load->view('global/notification');
     $this->load->view('template/footer');
 }
开发者ID:92bayu,项目名称:juragan,代码行数:26,代码来源:notification.php


示例5: __construct

 /**
  * Constructor
  *
  * @see Filter::$options for the format of the options array
  *
  * @param array $options An associative array of options
  */
 public function __construct(array $options = array())
 {
     $this->name = 'filter_by_site';
     $this->label = 'site';
     $this->placeholder = lang('filter_by_site');
     $this->options = $options;
 }
开发者ID:vigm,项目名称:advancedMD,代码行数:14,代码来源:Site.php


示例6: display_settings

 /**
  * Display settings sub-form for this variable type
  *
  * @param      mixed     $var_id        The id of the variable: 'new' or numeric
  * @param      array     $var_settings  The settings of the variable
  * @return     array
  */
 function display_settings($var_id, $var_settings)
 {
     // -------------------------------------
     //  Init return value
     // -------------------------------------
     $r = array();
     // -------------------------------------
     //  Check current value from settings
     // -------------------------------------
     $rows = $this->get_setting('rows', $var_settings);
     // -------------------------------------
     //  Build settings for rows
     // -------------------------------------
     $r[] = array($this->setting_label(lang('variable_rows')), form_input(array('name' => $this->input_name('rows'), 'value' => $rows, 'maxlength' => '4', 'class' => 'x-small')));
     // -------------------------------------
     //  Build settings text_direction
     // -------------------------------------
     $dir_options = '';
     foreach (array('ltr', 'rtl') as $dir) {
         $dir_options .= '<label class="low-radio">' . form_radio($this->input_name('text_direction'), $dir, $this->get_setting('text_direction', $var_settings) == $dir) . ' ' . lang("text_direction_{$dir}") . '</label>';
     }
     $r[] = array($this->setting_label(lang('text_direction')), $dir_options);
     // -------------------------------------
     //  Return output
     // -------------------------------------
     return $r;
 }
开发者ID:kentonquatman,项目名称:iofa,代码行数:34,代码来源:vt.low_rte.php


示例7: userCakeAddUser

 public function userCakeAddUser()
 {
     global $db, $emailActivation, $websiteUrl, $db_table_prefix;
     //Construct a secure hash for the plain text password
     $secure_pass = generateHash($this->clean_password);
     //Construct a unique activation token
     $this->activation_token = generateActivationToken();
     //Do we need to send out an activation email?
     if ($emailActivation) {
         //User must activate their account first
         $this->user_active = 0;
         $mail = new userCakeMail();
         //Build the activation message
         $activation_message = lang("ACTIVATION_MESSAGE", array($websiteUrl, $this->activation_token));
         //Define more if you want to build larger structures
         $hooks = array("searchStrs" => array("#ACTIVATION-MESSAGE", "#ACTIVATION-KEY", "#USERNAME#"), "subjectStrs" => array($activation_message, $this->activation_token, $this->unclean_username));
         /* Build the template - Optional, you can just use the sendMail function 
         			Instead to pass a message. */
         if (!$mail->newTemplateMsg("new-registration.txt", $hooks)) {
             $this->mail_failure = true;
         } else {
             //Send the mail. Specify users email here and subject.
             //SendMail can have a third parementer for message if you do not wish to build a template.
             if (!$mail->sendMail($this->clean_email, "Επιβεβαιώστε την εγγραφή σας στο Σύλλογο Αποφοίτων")) {
                 $this->mail_failure = true;
             }
         }
     } else {
         //Instant account activation
         $this->user_active = 1;
     }
     //Insert the user into the database providing no errors have been found.
     $sql = "INSERT INTO `" . $db_table_prefix . "Users` (\n\t\t\t\t`Username`,\n\t\t\t\t`Username_Clean`,\n\t\t\t\t`Password`,\n\t\t\t\t`Email`,\n\t\t\t\t`ActivationToken`,\n\t\t\t\t`LastActivationRequest`,\n\t\t\t\t`LostPasswordRequest`, \n\t\t\t\t`Active`,\n\t\t\t\t`Group_ID`,\n\t\t\t\t`SignUpDate`,\n\t\t\t\t`LastSignIn`\n\t\t\t\t)\n\t\t \t\tVALUES (\n\t\t\t\t'" . $db->sql_escape($this->unclean_username) . "',\n\t\t\t\t'" . $db->sql_escape($this->clean_username) . "',\n\t\t\t\t'" . $secure_pass . "',\n\t\t\t\t'" . $db->sql_escape($this->clean_email) . "',\n\t\t\t\t'" . $this->activation_token . "',\n\t\t\t\t'" . time() . "',\n\t\t\t\t'0',\n\t\t\t\t'" . $this->user_active . "',\n\t\t\t\t'1',\n\t\t\t\t'" . time() . "',\n\t\t\t\t'0'\n\t\t\t\t)";
     return $db->sql_query($sql);
 }
开发者ID:skarabasakis,项目名称:alumniclub_usercake,代码行数:35,代码来源:class.newuser.php


示例8: getsetting

 function getsetting()
 {
     global $_G;
     $settings = $this->setting;
     if ($settings['catid']) {
         $settings['catid']['value'][] = array(0, lang('portalcp', 'block_all_category'));
         loadcache('portalcategory');
         foreach ($_G['cache']['portalcategory'] as $value) {
             if ($value['level'] == 0) {
                 $settings['catid']['value'][] = array($value['catid'], $value['catname']);
                 if ($value['children']) {
                     foreach ($value['children'] as $catid2) {
                         $value2 = $_G['cache']['portalcategory'][$catid2];
                         $settings['catid']['value'][] = array($value2['catid'], '-- ' . $value2['catname']);
                         if ($value2['children']) {
                             foreach ($value2['children'] as $catid3) {
                                 $value3 = $_G['cache']['portalcategory'][$catid3];
                                 $settings['catid']['value'][] = array($value3['catid'], '---- ' . $value3['catname']);
                             }
                         }
                     }
                 }
             }
         }
     }
     if ($settings['tag']) {
         $tagnames = article_tagnames();
         foreach ($tagnames as $k => $v) {
             $settings['tag']['value'][] = array($k, $v);
         }
     }
     return $settings;
 }
开发者ID:dalinhuang,项目名称:healthshop,代码行数:33,代码来源:block_article.php


示例9: site

 public function site()
 {
     $api = array("user_id" => $this->user->getId(), "username" => $this->user->getUsername(), "user_ip" => $this->input->ip_address());
     $vote_site_id = $this->input->post('id');
     //The site where we are voting for.
     if (!$vote_site_id) {
         die("Please specify topsite ID");
     }
     //Get the vote site info, returns false if the site does not exists!!
     $vote_site = $this->vote_model->getVoteSite($vote_site_id);
     //Check if they already voted with that ip.
     $can_vote = $this->vote_model->canVote($vote_site_id);
     //Check if that site exists and that the user didn't voted for it yet.
     if ($vote_site && $can_vote) {
         //Update the vp if needed or else just go to the url if we got vote callback enabled.
         if ($vote_site['callback_enabled']) {
             $vote_url = preg_replace("/\\{user_id\\}/", $this->user->getId(), $vote_site['vote_url']);
             if ($this->input->post("isFirefoxHerpDerp")) {
                 die($vote_url);
             }
             redirect($vote_url);
         } else {
             $this->vote_model->vote_log($api['user_id'], $api['user_ip'], $vote_site_id);
             $this->vote_model->updateVp($this->user->getId(), $vote_site['points_per_vote']);
             $this->plugins->onVote($api['user_id'], $vote_site);
             if ($this->input->post("isFirefoxHerpDerp")) {
                 die($vote_site['vote_url']);
             }
             redirect($vote_site['vote_url']);
         }
     } else {
         die(lang("already_voted", "vote"));
     }
 }
开发者ID:ahuraa,项目名称:Yekta-Cms,代码行数:34,代码来源:vote.php


示例10: index

 /**
  * Settings form
  * 
  * @param void
  * @return null
  */
 function index()
 {
     js_assign('test_svn_url', assemble_url('admin_source_test_svn'));
     $source_data = $this->request->post('source');
     if (!is_foreachable($source_data)) {
         $source_data = array('svn_path' => ConfigOptions::getValue('source_svn_path'), 'svn_config_dir' => ConfigOptions::getValue('source_svn_config_dir'), 'source_svn_use_output_redirect' => ConfigOptions::getValue('source_svn_use_output_redirect'), 'source_svn_trust_server_cert' => ConfigOptions::getValue('source_svn_trust_server_cert'));
     }
     // if
     if ($this->request->isSubmitted()) {
         $svn_path = array_var($source_data, 'svn_path', null);
         $svn_path = $svn_path ? with_slash($svn_path) : null;
         ConfigOptions::setValue('source_svn_path', $svn_path);
         $svn_config_dir = array_var($source_data, 'svn_config_dir') == '' ? null : array_var($source_data, 'svn_config_dir');
         ConfigOptions::setValue('source_svn_config_dir', $svn_config_dir);
         $svn_use_output_redirection = array_var($source_data, 'source_svn_use_output_redirect') == "1";
         ConfigOptions::setValue('source_svn_use_output_redirect', $svn_use_output_redirection);
         $svn_trust_server_certificate = array_var($source_data, 'source_svn_trust_server_cert') == "1";
         ConfigOptions::setValue('source_svn_trust_server_cert', $svn_trust_server_certificate);
         flash_success("Source settings successfully saved");
         $this->redirectTo('admin_source');
     }
     // if
     if (!RepositoryEngine::executableExists()) {
         $this->wireframe->addPageMessage(lang("SVN executable not found. You won't be able to use this module"), 'error');
     }
     // if
     $this->smarty->assign(array('source_data' => $source_data));
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:34,代码来源:SourceAdminController.class.php


示例11: reject

 public function reject($id)
 {
     $this->auth->checkIfOperationIsAllowed('reject_overtime');
     $this->load->model('users_model');
     $this->load->model('delegations_model');
     $extra = $this->overtime_model->getExtras($id);
     if (empty($extra)) {
         redirect('notfound');
     }
     $employee = $this->users_model->getUsers($extra['employee']);
     $is_delegate = $this->delegations_model->isDelegateOfManager($this->user_id, $employee['manager']);
     if ($this->user_id == $employee['manager'] || $this->is_hr || $is_delegate) {
         $this->overtime_model->rejectExtra($id);
         $this->sendMail($id);
         $this->session->set_flashdata('msg', lang('overtime_reject_flash_msg_success'));
         if (isset($_GET['source'])) {
             redirect($_GET['source']);
         } else {
             redirect('overtime');
         }
     } else {
         log_message('error', 'User #' . $this->user_id . ' illegally tried to reject extra #' . $id);
         $this->session->set_flashdata('msg', lang('overtime_reject_flash_msg_error'));
         redirect('leaves');
     }
 }
开发者ID:HarkiratGhotra,项目名称:application,代码行数:26,代码来源:overtime.php


示例12: latest_fotos_configure

 public function latest_fotos_configure($action = 'show_settings', $widget_data = array())
 {
     if ($this->dx_auth->is_admin() == FALSE) {
         exit;
     }
     switch ($action) {
         case 'show_settings':
             //$this->display_tpl('latest_fotos_form', array('widget' => $widget_data));
             $this->render('latest_fotos_form', array('widget' => $widget_data));
             break;
         case 'update_settings':
             $this->load->library('Form_validation');
             $this->form_validation->set_rules('limit', lang("Image limit", 'gallery'), 'trim|required|integer');
             if ($this->form_validation->run($this) == FALSE) {
                 showMessage(validation_errors(), false, 'r');
                 exit;
             }
             $data = array('limit' => $_POST['limit'], 'order' => $_POST['order']);
             $this->load->module('admin/widgets_manager')->update_config($widget_data['id'], $data);
             showMessage(lang("Settings have been saved", 'gallery'));
             if ($_POST['action'] == 'tomain') {
                 pjax('/admin/widgets_manager/index');
             }
             break;
         case 'install_defaults':
             $data = array('limit' => 5, 'order' => 'latest');
             $this->load->module('admin/widgets_manager')->update_config($widget_data['id'], $data);
             break;
     }
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:30,代码来源:gallery_widgets.php


示例13: creat_payment

 /**
  * [creat_payment 创建支付]
  * @param  [type] $buyer   [description]
  * @param  [type] $pids    [description]
  * @param  [type] $amount  [description]
  * @param  [type] $tel     [description]
  * @param  [type] $address [description]
  * @return [type]          [description]
  */
 public function creat_payment($buyer, $pids, $amount, $tel, $address, $channel)
 {
     $arr = explode(',', $pids);
     $total_fee = 0;
     $title_str = "";
     foreach ($arr as $k => $v) {
         //传递参数被篡改
         if (!is_numeric($v)) {
             $this->error->output('TRANSACT_DATA');
         }
         $p = $this->production_model->get_production_by_id($v);
         //商品不存在,已售出,下架
         if (empty($p) || $p['status'] == 1 || $p['status'] == 2) {
             $this->error->output('NO_GOOD');
         }
         $total_fee += (double) $p['price'];
         $title_str .= $p['name'] . ", ";
     }
     //显示价格被篡改
     if ($total_fee != $amount) {
         $this->error->output('TRANSACT_DATA');
     }
     $order_no = time() . 'u_' . $buyer;
     $subject = lang('BUY_SUBJECT');
     $body = $title_str;
     $extra_common_param = array('buyer' => $buyer, 'pids' => $pids, 'amount' => $amount, 'tel' => $tel, 'address' => $address);
     $extra_common_param = json_encode($extra_common_param);
     //创建支付
     switch ($channel) {
         case 'alipay':
             return $this->_alipay();
             break;
     }
 }
开发者ID:897475686,项目名称:vc,代码行数:43,代码来源:transaction_service.php


示例14: smarty_function_select_default_assignment_filter

/**
 * Render select_default_assignment_filter control
 * 
 * Parameters:
 * 
 * - user - User - User using the page
 * - value - integer - ID of selected filter
 * - optional - boolean - Value is optional?
 *
 * @param array $params
 * @param Smarty $smarty
 * @return string
 */
function smarty_function_select_default_assignment_filter($params, &$smarty)
{
    $user = array_var($params, 'user', null, true);
    $value = array_var($params, 'value', null, true);
    $optional = array_var($params, 'optional', true, true);
    $default_filter_id = (int) ConfigOptions::getValue('default_assignments_filter');
    $default_filter = $default_filter_id ? AssignmentFilters::findById($default_filter_id) : null;
    $options = array();
    if (instance_of($default_filter, 'AssignmentFilter') && $optional) {
        $options[] = option_tag(lang('-- System Default (:filter) --', array('filter' => $default_filter->getName())), '');
    }
    // if
    $grouped_filters = AssignmentFilters::findGrouped($user, true);
    if (is_foreachable($grouped_filters)) {
        foreach ($grouped_filters as $group_name => $filters) {
            $group_options = array();
            foreach ($filters as $filter) {
                $group_options[] = option_tag($filter->getName(), $filter->getId(), array('selected' => $value == $filter->getId()));
            }
            // foreach
            if (count($options) > 0) {
                $options[] = option_tag('', '');
            }
            // if
            $options[] = option_group_tag($group_name, $group_options);
        }
        // foreach
    }
    // if
    return select_box($options, $params);
}
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:44,代码来源:function.select_default_assignment_filter.php


示例15: getsetting

 function getsetting()
 {
     global $_G;
     $settings = $this->setting;
     if ($settings['fids']) {
         loadcache('forums');
         $settings['fids']['value'][] = array(0, lang('portalcp', 'block_all_forum'));
         foreach ($_G['cache']['forums'] as $fid => $forum) {
             $settings['fids']['value'][] = array($fid, ($forum['type'] == 'forum' ? str_repeat('&nbsp;', 4) : ($forum['type'] == 'sub' ? str_repeat('&nbsp;', 8) : '')) . $forum['name']);
         }
     }
     if ($settings['sortids']) {
         $defaultvalue = '';
         $query = DB::query("SELECT typeid, name, special FROM " . DB::table('forum_threadtype') . " ORDER BY typeid DESC");
         while ($threadtype = DB::fetch($query)) {
             if ($threadtype['special']) {
                 if (empty($defaultvalue)) {
                     $defaultvalue = $threadtype['typeid'];
                 }
                 $settings['sortids']['value'][] = array($threadtype['typeid'], $threadtype['name']);
             }
         }
         $settings['sortids']['default'] = $defaultvalue;
     }
     return $settings;
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:26,代码来源:block_sort.php


示例16: forgotten_password

 public function forgotten_password($email)
 {
     $this->auth_model->get_by_email($email);
     if ($this->auth_model->exists()) {
         $new_password = mt_rand(100000, 999999);
         $user = $this->auth_model->all[0];
         $user->password = $new_password;
         $user->confirm_password = $new_password;
         if ($user->save()) {
             $CI =& ci_get_instance();
             $msg = new stdClass();
             $msg->subject = lang('auth_password_change_successful');
             $msg->body = array();
             $msg->body[] = lang('common_email') . ': ' . $email;
             $msg->body[] = lang('common_password') . ': ' . $new_password;
             $msg_id = $CI->hc_notifier->add_message($msg);
             $CI->hc_notifier->enqueue_message($msg_id, $user);
             return TRUE;
         } else {
             $this->error = $this->auth_model->string;
             return FALSE;
         }
     } else {
         $this->error = lang('auth_forgot_password_unsuccessful') . ': ' . $email . ' Not Found';
         return FALSE;
     }
 }
开发者ID:RVRKC,项目名称:Hackathon_2015,代码行数:27,代码来源:hc_auth.php


示例17: index

 public function index()
 {
     $this->template->registerMeta("ROBOTS", "NOINDEX, NOFOLLOW");
     $this->core->set_meta_tags(lang('Feedback', 'feedback'));
     $this->load->library('form_validation');
     // Create captcha
     $this->dx_auth->captcha();
     $tpl_data['cap_image'] = $this->dx_auth->get_captcha_image();
     $this->template->add_array($tpl_data);
     if (count($_POST) > 0) {
         $this->form_validation->set_rules('name', lang('Your name', 'feedback'), 'trim|required|min_length[3]|max_length[' . $this->username_max_len . ']|xss_clean');
         $this->form_validation->set_rules('email', lang('Email', 'feedback'), 'trim|required|valid_email|xss_clean');
         $this->form_validation->set_rules('theme', lang('Subject', 'feedback'), 'trim|required|max_length[' . $this->theme_max_len . ']|xss_clean');
         $this->form_validation->set_rules('message', lang('Message', 'feedback'), 'trim|required|max_length[' . $this->message_max_len . ']|xss_clean');
         if ($this->dx_auth->use_recaptcha) {
             $this->form_validation->set_rules('recaptcha_response_field', lang("Protection code", 'feedback'), 'trim|xss_clean|required|callback_recaptcha_check');
         } else {
             $this->form_validation->set_rules('captcha', lang("Protection code", 'feedback'), 'trim|required|xss_clean|callback_captcha_check');
         }
         if ($this->form_validation->run($this) == FALSE) {
             // there are errors
             $this->form_validation->set_error_delimiters("", "");
             CMSFactory\assetManager::create()->setData('validation', $this->form_validation);
         } else {
             // form is validate
             $this->message = strip_tags(nl2br(lang('Theme', 'feedback') . ' : ' . $this->input->post('theme') . lang('Name', 'feedback') . ' : ' . $this->input->post('name') . lang('E-mail', 'feedback') . ' : ' . $this->input->post('email') . lang('Message', 'feedback') . ' : ' . $this->input->post('message')));
             $this->_send_message();
         }
     }
     CMSFactory\assetManager::create()->render('feedback');
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:31,代码来源:feedback.php


示例18: getDataColumns

 public function getDataColumns()
 {
     $return = array();
     $return['summary'] = array();
     $return['summary'][] = array('data' => lang('reports_no'), 'align' => 'left');
     $return['summary'][] = array('data' => lang('reports_customer'), 'align' => 'left');
     $return['summary'][] = array('data' => lang('pawns_amount'), 'align' => 'right');
     $return['summary'][] = array('data' => lang('pawns_pay_amount'), 'align' => 'right');
     $return['summary'][] = array('data' => lang('pawns_amount_due'), 'align' => 'right');
     //$return['summary'][] = array('data'=>lang('pawns_deposit'), 'align'=> 'right');
     $return['summary'][] = array('data' => lang('pawns_rate_no_percent'), 'align' => 'right');
     //$return['summary'][] = array('data'=>lang('pawns_pay_rate'), 'align'=> 'right');
     $return['summary'][] = array('data' => lang('pawns_pay_rate'), 'align' => 'right');
     if ($this->Employee->has_module_action_permission('reports', 'show_profit', $this->Employee->get_logged_in_employee_info()->person_id)) {
         $return['summary'][] = array('data' => lang('reports_profit'), 'align' => 'right');
     }
     $return['details'] = array();
     $return['details'][] = array('data' => lang('reports_no'), 'align' => 'left');
     $return['details'][] = array('data' => lang('reports_date'), 'align' => 'left');
     $return['details'][] = array('data' => lang('pawns_amount'), 'align' => 'right');
     $return['details'][] = array('data' => lang('pawns_pay_amount'), 'align' => 'right');
     $return['details'][] = array('data' => lang('pawns_amount_due'), 'align' => 'right');
     //$return['details'][] = array('data'=>lang('pawns_deposit'), 'align'=> 'right');
     $return['details'][] = array('data' => lang('pawns_rate'), 'align' => 'right');
     $return['details'][] = array('data' => lang('pawns_pay_rate'), 'align' => 'right');
     $return['details'][] = array('data' => lang('pawns_number_of_day_late'), 'align' => 'right');
     $return['details'][] = array('data' => lang('pawns_fine'), 'align' => 'right');
     if ($this->Employee->has_module_action_permission('reports', 'show_profit', $this->Employee->get_logged_in_employee_info()->person_id)) {
         $return['details'][] = array('data' => lang('reports_profit'), 'align' => 'right');
     }
     return $return;
 }
开发者ID:ekchanthorn,项目名称:demo_loan,代码行数:32,代码来源:detailed_pawns.php


示例19: index

 function index()
 {
     if ($this->request->isAsyncCall()) {
         $my_pub_key = ConfigOptions::getValue('frosso_auth_my_pub_key', false);
         $my_pri_key = ConfigOptions::getValue('frosso_auth_my_pri_key', false);
         $token = ConfigOptions::getValue('frosso_auth_my_pri_token', false);
         $this->smarty->assign(array('my_pub_key' => $my_pub_key, 'my_pri_key' => $my_pri_key, 'token' => $token));
         if ($this->request->isSubmitted()) {
             $my_pub_sub = $this->request->post('my_pub_key');
             $my_pri_sub = $this->request->post('my_pri_key');
             $sub_token = $this->request->post('token');
             if ($sub_token) {
                 if (FrossoAuthModel::isValidKey($my_pub_sub, $my_pri_sub)) {
                     ConfigOptions::setValue('frosso_auth_my_pub_key', $my_pub_sub);
                     ConfigOptions::setValue('frosso_auth_my_pri_key', $my_pri_sub);
                     ConfigOptions::setValue('frosso_auth_my_pri_token', $sub_token);
                     $my_pub_key = $my_pub_sub;
                     $my_pri_key = $my_pri_sub;
                     $this->response->ok();
                 } else {
                     $this->response->exception(new ValidationErrors(array('my_pub_key' => lang("Public key and private key must be valid"))));
                 }
             } else {
                 $this->response->exception(new ValidationErrors(array('token' => lang("Token must be valid"))));
             }
         }
         // isSubmitted
     } else {
         $this->response->badRequest();
     }
     // if
 }
开发者ID:NaszvadiG,项目名称:ACModules,代码行数:32,代码来源:FrossoAuthAdminController.class.php


示例20: newTemplateMsg

 public function newTemplateMsg($template, $additionalHooks)
 {
     global $mail_templates_dir, $debug_mode;
     $this->contents = file_get_contents($mail_templates_dir . $template);
     //Check to see we can access the file / it has some contents
     if (!$this->contents || empty($this->contents)) {
         if ($debug_mode) {
             if (!$this->contents) {
                 echo lang("MAIL_TEMPLATE_DIRECTORY_ERROR", array(getenv("DOCUMENT_ROOT")));
                 die;
             } else {
                 if (empty($this->contents)) {
                     echo lang("MAIL_TEMPLATE_FILE_EMPTY");
                     die;
                 }
             }
         }
         return false;
     } else {
         //Replace default hooks
         $this->contents = replaceDefaultHook($this->contents);
         //Replace defined / custom hooks
         $this->contents = str_replace($additionalHooks["searchStrs"], $additionalHooks["subjectStrs"], $this->contents);
         //Do we need to include an email footer?
         //Try and find the #INC-FOOTER hook
         if (strpos($this->contents, "#INC-FOOTER#") !== FALSE) {
             $footer = file_get_contents($mail_templates_dir . "email-footer.html");
             if ($footer && !empty($footer)) {
                 $this->contents .= replaceDefaultHook($footer);
             }
             $this->contents = str_replace("#INC-FOOTER#", "", $this->contents);
         }
         return true;
     }
 }
开发者ID:davidvdtak,项目名称:AIRdb,代码行数:35,代码来源:class.mail.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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