コード例 #1
0
 public function test_meta()
 {
     $this->assertEquals("<meta name=\"test\" content=\"foo\" />\n", meta('test', 'foo'));
     $this->assertEquals("<meta name=\"foo\" content=\"\" />\n", meta(array('name' => 'foo')));
     $this->assertEquals("<meta charset=\"foo\" />\n", meta(array('name' => 'foo', 'type' => 'charset')));
     $this->assertEquals("<meta charset=\"foo\" />\n", meta(array('name' => 'foo', 'type' => 'charset')));
 }
コード例 #2
0
ファイル: print.mod.php プロジェクト: pf5512/phpstudy
	function Delivery()
	{
		$this->CheckAdminPrivs('print');
		$oid = get('oid', 'number');
		$senderID = get('sender', 'int');
				$lastADDR = meta('cdp_service_lastADDR');
		if ($lastADDR != $senderID)
		{
			meta('cdp_service_lastADDR', $senderID);
		}
				$cdpResult = logic('express')->cdp()->CreatePrinterConfig($oid, $senderID);
		if ($cdpResult['__error__'])
		{
			$this->Messager('您还没有设置打印模板,系统正在跳转到模板编辑页面,请稍候...', '?mod=express&code=corp&op=delivery&id='.$cdpResult['corpID'], 3);
		}
				logic('express')->cdp()->Printed($oid, $senderID);
				$cdpCFG = $cdpResult['config'];
		$cdpDATA = $cdpResult['cdp'];
				$background = logic('upload')->GetOne($cdpDATA['bgid']);
		$background['extra'] = unserialize($background['extra']);
		if (!$background['extra']['width'] || !$background['extra']['height'])
		{
			$background['extra'] = handler('image')->Info($background['path']);
			logic('upload')->Field($background['id'], 'extra', serialize(array('width'=>$background['extra']['width'],'height'=>$background['extra']['height'])));
		}
				include handler('template')->file('@admin/print_delivery');
	}
コード例 #3
0
ファイル: dentists.php プロジェクト: unisexx/drtooth
 function view($id)
 {
     $data['rs'] = new Dentist($id);
     $this->template->title(lang_decode($data['rs']->name) . ' - DrTooth Dental Clinic');
     $this->template->append_metadata(meta('description', lang_decode($data['rs']->name) . strip_tags(lang_decode($data['rs']->detail))));
     $this->template->build('view', $data);
 }
コード例 #4
0
ファイル: me.logic.php プロジェクト: pf5512/phpstudy
	function finder( $uid, $productid )
	{
		if (!meta('p_ir_'.$productid))
		{
			return false;
		}
		$sql = 'select finder,findtime from ' . TABLE_PREFIX . 'system_members where uid = ' . intval($uid);
		$query = $this->DatabaseHandler->Query($sql);
		if ( ! $query ) return false;
		$finder = $query->GetRow();
		$finderid = $finder['finder'];
		$findtime = $finder['findtime'];
		if ( $finderid == 0 || $findtime == 0 )
		{
			return false;
		}
		if ( $findtime + (72 * 3600) < time() )
		{
			return false;
		}
				$sql = 'select count(*) from ' . TABLE_PREFIX . 'tttuangou_order where userid = ' . intval($uid) . ' AND paytime > 0';
		$query = $this->DatabaseHandler->Query($sql);
		$result = $query->GetRow();
		if ( $result['count(*)'] > 1 )
		{
			return false;
		}
		$ary = array(
			'buyid' => $uid, 'buytime' => time(), 'productid' => $productid, 'finderid' => $finderid, 'findtime' => $findtime
		);
		$this->DatabaseHandler->SetTable(TABLE_PREFIX . 'tttuangou_finder');
		$result = $this->DatabaseHandler->Insert($ary);
		return true;
	}
コード例 #5
0
 function index()
 {
     // check permission
     if ($this->account_model->check_admin_permission('account_permissions', 'account_manage_permission') == false) {
         redirect('site-admin');
     }
     // load library
     $this->load->library('session');
     // load languages
     $this->modules_model->load_languages();
     if ($this->session->flashdata('update_status') !== null) {
         $output['form_status'] = $this->session->flashdata('update_status');
     }
     $output['list_permissions'] = $this->account_model->list_level_permission();
     $output['admin_content'] = $this->load->view('site-admin/account_permission_view', $output, true);
     // headr tags output###########################################
     $output['page_title'] = $this->config_model->load('site_name') . $this->config_model->load('page_title_separator') . $this->lang->line('account_permissions');
     // meta tag
     $output['page_metatag'][] = meta('Cache-Control', 'no-cache', 'http-equiv');
     $output['page_metatag'][] = meta('Pragma', 'no-cache', 'http-equiv');
     // link tag
     //$output['page_linktag'][] = link_tag( 'favicon.ico', 'shortcut icon', 'image/ico' );
     //$output['page_linktag'][] = link_tag( 'favicon2.ico', 'shortcut icon2', 'image/ico' );
     // script tag
     //$output['page_scripttag'][] = "<script type=\"text/javascript\" src=\"tinymcs.js\"></script>\n";
     //$output['page_scripttag'][] = "<script type=\"text/javascript\" src=\"fckkeditor.js\"></script>\n";
     // end headr tags output###########################################
     // output
     $this->output->set_header('Cache-Control: no-store, no-cache, must-revalidate');
     $this->output->set_header('Pragma: no-cache');
     $this->load->view('site-admin/index_view', $output);
 }
コード例 #6
0
ファイル: Admin.php プロジェクト: eusonlito/web-deploy
 public function log()
 {
     meta()->set('title', 'Web Deploy Log');
     if (is_object($error = $this->check())) {
         return $error;
     }
     $last = (int) input('last') ?: config('git')['log_history'];
     return self::content('admin.log', array('last' => $last, 'log' => $this->git()->getLogStat($last)));
 }
コード例 #7
0
ファイル: init.php プロジェクト: thruthesky/backend
function category($code = null)
{
    if ($code) {
        $meta = meta('company_category');
        return $meta->load($code);
    } else {
        return meta('company_category');
    }
}
コード例 #8
0
ファイル: Git.php プロジェクト: eusonlito/web-deploy
 public function log()
 {
     meta()->set('title', 'GIT Log');
     if (is_object($error = $this->check())) {
         return $error;
     }
     $git = $this->git();
     $last = (int) input('last') ?: config('git')['log_history'];
     return self::content('git.log', array('last' => $last, 'log' => $git->setCommitLinks($git->getLogStat($last))));
 }
コード例 #9
0
 function index()
 {
     $this->title = 'Welcome to Becak MVC Framework !';
     $this->meta .= meta('keywords', 'becak, php5, framework');
     $this->head .= css('welcome.js');
     $this->head .= script('welcome');
     $data['var'] = 'This page generated by Becak MVC Framework.';
     $this->body = view('view_welcome', $data);
     app_view('view_base');
 }
コード例 #10
0
ファイル: Philgo.php プロジェクト: thruthesky/overframe
 public function uninstall()
 {
     $attend = node('philgo_attend');
     if ($attend->exists()) {
         $attend->uninit();
     }
     $meta = meta('philgo');
     if ($meta->exists()) {
         $meta->uninit();
     }
 }
コード例 #11
0
ファイル: Spider_func.php プロジェクト: ahmatjan/lv
 public function __construct()
 {
     $this->CI =& get_instance();
     //$this->CI调用框架方法
     $this->CI->load->helper(array('html', 'string', 'url'));
     $this->CI->load->model('tool/spider_model');
     if (!is_cli()) {
         echo doctype('html4-trans') . meta('Content-type', 'text/html;charset=utf-8', 'equiv');
         echo link_tag(base_url('public/image/favicon.ico'), 'shortcut icon', 'image/ico');
     }
 }
コード例 #12
0
 public function __construct()
 {
     parent::__construct();
     loader::sys_helper('view');
     loader::sys_helper('head_tag');
     $this->base = common::config_item('base_url');
     $this->base_url = common::config_item('base_url') . common::config_item('index_page');
     $this->base_img = common::config_item('source_url') . 'images/';
     $this->meta = meta('Content-type', 'text/html; charset=utf-8', 'equiv');
     $this->meta .= meta('author', 'Eko Heri Susanto');
 }
コード例 #13
0
ファイル: pshop.php プロジェクト: quanict/parkornleather
 function seo()
 {
     // 		bug($this->title);
     if ($this->title === null) {
         $this->title = lang('sitename');
     } else {
         $this->title = $this->title . ' - ' . lang('sitename');
     }
     // 		bug($this->title);
     echo HTML('title', $this->title);
     $this->description = lang('About Parkorn Leather Description');
     echo meta('description', $this->description);
 }
コード例 #14
0
ファイル: Rsync.php プロジェクト: eusonlito/web-deploy
 public function update()
 {
     meta()->set('title', 'RSYNC Update');
     if (is_object($response = $this->check())) {
         return $response;
     }
     if (input('find') === 'true') {
         $files = (new Repository\Rsync())->getUpdatedFiles();
     } else {
         $files = array();
     }
     return self::content('rsync.update', array('config' => config('rsync'), 'files' => $files, 'processor' => (new Processor\Rsync())->update()));
 }
コード例 #15
0
/**
 * To show last meta
 * 
 ****/
function meta_last_page()
{
    $meta = array(array('name' => 'robots', 'content' => 'index, follow, all'), array('name' => 'revisit-after', 'content' => '1 days'), array('name' => 'language', 'content' => 'Vietnamese'), array('name' => 'dc.creator.email', 'content' => '*****@*****.**'), array('name' => 'dc.identifier', 'content' => base_url()), array('name' => 'dc.language', 'content' => 'vi-VN'), array('name' => 'og:type', 'content' => 'article'), array('name' => 'og:title', 'content' => 'Phòng khám đa khoa Apollo'), array('name' => 'geo.position', 'content' => '20.995733, 105.842902'), array('name' => 'geo.placename', 'content' => 'TP.HCM, Hà Nội'), array('name' => 'geo.region', 'content' => 'VN-65'));
    $meta_properties = "<meta property='og:type' content='article' />\n";
    $meta_properties .= "<meta property='og:title' content='Phòng khám đa khoa Apollo' />\n";
    $meta_properties .= "<meta property='og:description' content='Phòng Khám Đa Khoa apollo với các thiết bị y tế hiện đại, phong cách phục vụ chuyên nghiệp hy vọng sẽ góp phần giúp cho tất cả mọi người luôn có một sức khỏe tốt. />\n";
    $meta_properties .= "<meta property='og:url' content='" . base_url() . "' />\n";
    $meta_properties .= "<meta property='og:sitename' content='Phòng Khám Đa Khoa APOLLO' />";
    $meta_itemprop = "<meta itemprop='name' content='Phòng khám đa khoa Apollo' />\n";
    $meta_itemprop .= "<meta itemprop='description' content='Phòng Khám Đa Khoa apollo với các thiết bị y tế hiện đại, phong cách phục vụ chuyên nghiệp hy vọng sẽ góp phần giúp cho tất cả mọi người luôn có một sức khỏe tốt.' />\n";
    $xhtml_meta = meta($meta) . $meta_properties . $meta_itemprop;
    return $xhtml_meta;
}
コード例 #16
0
ファイル: Controller.php プロジェクト: thruthesky/backend
 public function test()
 {
     echo "Installation check:\n";
     if ($this->exists()) {
         echo "OK: Company data table exists.\n";
     } else {
         echo "ERROR: Company data table does not exists.\n";
     }
     if (meta('company_category')->exists()) {
         echo "OK: Company category table exists.\n";
     } else {
         echo "ERROR: Company category table does not exists.\n";
     }
 }
コード例 #17
0
/**
 * Gets all custom fields within a certain page or post and parses them out into an array
 * with +meta()+
 * 
 * Example:
 *  a post with the following custom fields/values:
 *    key = options, value = 'sort=asc&show_link=1'
 *    key = subtitle, value = 'my subtitle'
 *    key = image, value = 'image01.jpg'
 *    key = image, value = 'image02.jpg'
 * 
 * when run with +metas()+ would produce:
 *  
 *    array(
 *      'options' => array('sort' => 'asc', 'show_link' => 1), 
 *      'images' => array('image01.jpg', 'image02.jpg'),
 *      'subtitle' => 'my subtitle')
 * 
 * @return array  on array of all custom fields *except those beginning with an underscore* (those are considered private)
 */
function metas()
{
    global $post;
    $_ = array();
    if ($keys = get_post_custom_keys($post->ID)) {
        foreach ($keys as $index => $key) {
            if (substr($key, 0, 1) == '_') {
                continue;
            }
            // ignore _key's as those are wordpress-specific
            $_[$key] = meta($key);
        }
    }
    return $_;
}
コード例 #18
0
ファイル: Install.php プロジェクト: thruthesky/backend
 public function deleteAllCategory()
 {
     $category = meta('company_category');
     $cats = $category->loadQuery();
     if ($cats) {
         foreach ($cats as $cat) {
             $id = $cat->getRecord('id');
             $file = data()->load(" gid='company-category' AND code='{$id}' ");
             if ($file) {
                 $file->delete();
             }
             $cat->delete();
         }
     }
 }
コード例 #19
0
ファイル: Ftp.php プロジェクト: eusonlito/web-deploy
 public function update()
 {
     meta()->set('title', 'FTP Update');
     if (is_object($response = $this->check(true, true))) {
         return $response;
     }
     $config = config('ftp');
     $days = (int) input('days') ?: $config['days_history'];
     if (input('find') === 'true') {
         $files = (new Repository\Ftp())->getRecentFiles($days);
     } else {
         $files = array();
     }
     return self::content('ftp.update', array('config' => $config, 'days' => $days, 'files' => $files, 'processor' => (new Processor\Ftp())->update()));
 }
コード例 #20
0
ファイル: post_questions.php プロジェクト: ycms/theme-evo
    function bak()
    {
        add_action('add_meta_boxes', function () {
            add_meta_box('movie_director', '扩展资料', function ($post) {
                // 创建临时隐藏表单,为了安全
                wp_nonce_field('movie_director_meta_box', 'movie_director_meta_box_nonce');
                // 获取之前存储的值
                $value = get_post_meta($post->ID, '_question_name', true);
                ?>

                <label for="question_name">名称:</label>
                <input type="text" id="question_name" name="question_name" value="<?php 
                echo esc_attr(meta('_question_name', $post->ID));
                ?>
" placeholder="">
                <label for="question_address">地址:</label>
                <input type="text" id="question_address" name="question_address" value="<?php 
                echo esc_attr(meta('_question_address', $post->ID));
                ?>
"
                       placeholder="">
                <?php 
            }, $this->id, 'normal', 'low');
        });
        add_action('save_post', function ($post_id) {
            // 安全检查
            // 检查是否发送了一次性隐藏表单内容(判断是否为第三者模拟提交)
            if (!isset($_POST['movie_director_meta_box_nonce'])) {
                return;
            }
            // 判断隐藏表单的值与之前是否相同
            if (!wp_verify_nonce($_POST['movie_director_meta_box_nonce'], 'movie_director_meta_box')) {
                return;
            }
            // 判断该用户是否有权限
            if (!current_user_can('edit_post', $post_id)) {
                return;
            }
            // 判断 Meta Box 是否为空
            if (!isset($_POST['movie_director'])) {
                return;
            }
            $movie_director = sanitize_text_field($_POST['movie_director']);
            update_post_meta($post_id, '_movie_director', $movie_director);
        });
    }
コード例 #21
0
ファイル: MetaTest.php プロジェクト: thruthesky/overframe
 private function test_get_set()
 {
     $meta = meta('def');
     if ($meta->exists()) {
         $meta->uninit();
     }
     $meta->init();
     $meta->set('a', 'b');
     test($meta->get('a') == 'b', 'OK', 'ERROR');
     $meta->set('a', 'c');
     test($meta->get('a') == 'c', 'OK', 'ERROR');
     $meta->set('name', 'jaeho');
     test($meta->get('name') == 'jaeho', 'OK', 'ERROR');
     $meta->set('first name of jung', 'eunsu');
     test($meta->get('first name of jung') == 'eunsu', 'OK', 'ERROR');
     test($meta->get('a') == 'c', 'OK', 'ERROR');
     $meta->uninit();
 }
コード例 #22
0
 /**
  * Register a list of functions available into Twig templates.
  * 
  * @return array|\Twig_SimpleFunction[]
  */
 public function getFunctions()
 {
     return [new Twig_SimpleFunction('wp_head', 'wp_head'), new Twig_SimpleFunction('wp_footer', 'wp_footer'), new Twig_SimpleFunction('body_class', function ($class = '') {
         return body_class($class);
     }), new Twig_SimpleFunction('post_class', function ($class = '', $id = null) {
         return post_class($class, $id);
     }), new Twig_SimpleFunction('wpautop', function ($text, $br = true) {
         return wpautop($text, $br);
     }), new Twig_SimpleFunction('wp_trim_words', function ($text, $num_words = 55, $more = null) {
         return wp_trim_words($text, $num_words, $more);
     }), new Twig_SimpleFunction('fn', function ($functionName) {
         $args = func_get_args();
         // By default, the function name should always be the first argument.
         // This remove it from the arguments list.
         array_shift($args);
         if (is_string($functionName)) {
             $functionName = trim($functionName);
         }
         return call_user_func_array($functionName, $args);
     }), new Twig_SimpleFunction('meta', function ($key, $id = null, $context = 'post', $single = true) {
         return meta($key, $id, $context, $single);
     }), new Twig_SimpleFunction('translate', function ($text, $domain = 'default') {
         return translate($text, $domain);
     }), new Twig_SimpleFunction('__', function ($text, $domain = 'default') {
         return __($text, $domain);
     }), new Twig_SimpleFunction('_e', function ($text, $domain = 'default') {
         return _e($text, $domain);
     }), new Twig_SimpleFunction('_n', function ($single, $plural, $number, $domain = 'default') {
         return _n($single, $plural, $number, $domain);
     }), new Twig_SimpleFunction('_x', function ($text, $context, $domain = 'default') {
         return _x($text, $context, $domain);
     }), new Twig_SimpleFunction('_ex', function ($text, $context, $domain = 'default') {
         return _ex($text, $context, $domain);
     }), new Twig_SimpleFunction('_nx', function ($single, $plural, $number, $context, $domain = 'default') {
         return _nx($single, $plural, $number, $context, $domain);
     }), new Twig_SimpleFunction('_n_noop', function ($singular, $plural, $domain = 'default') {
         return _n_noop($singular, $plural, $domain);
     }), new Twig_SimpleFunction('_nx_noop', function ($singular, $plural, $context, $domain = 'default') {
         return _nx_noop($singular, $plural, $context, $domain);
     }), new Twig_SimpleFunction('translate_nooped_plural', function ($nooped_plural, $count, $domain = 'default') {
         return translate_nooped_plural($nooped_plural, $count, $domain);
     })];
 }
コード例 #23
0
ファイル: view.php プロジェクト: neolanders/ci.view
 public function metas()
 {
     if (isset($this->_data['metas']['https'])) {
         $https = $this->_data['metas']['https'];
         // cache it
         foreach ($https as $k => $v) {
             echo meta($k, $v, 'equiv');
         }
         log_message('debug', 'View: render https metas');
     }
     if (isset($this->_data['metas']['name'])) {
         $name = $this->_data['metas']['name'];
         // cache it
         foreach ($name as $k => $v) {
             echo meta($k, $v);
         }
         log_message('debug', 'View: render metas');
     }
     return $this;
 }
コード例 #24
0
ファイル: forgetpw.php プロジェクト: Rundiz/vee-web-start
 function index()
 {
     if ($_POST) {
         // validate form
         $this->form_validation->set_rules('email', 'lang:account_email', 'trim|required|valid_email');
         if ($this->form_validation->run() == false) {
             $output['formforget_status'] = validation_errors('<div class="txt_error">', '</div>');
         } else {
             $email = trim(strip_tags($this->input->post('email', true)));
             // check captcha for forget password form
             if ($this->securimage->check(trim($this->input->post('captcha2', true))) == false) {
                 $result = $this->lang->line('account_wrong_captcha_code');
             } else {
                 // send confirm reset password
                 $result = $this->account_model->reset_password_1($email);
             }
             //
             if ($result === true) {
                 $output['form_status'] = '<div class="txt_success">' . $this->lang->line('account_please_check_email_confirm_resetpw') . '</div>';
             } else {
                 $output['form_status'] = '<div class="txt_error">' . $result . '</div>';
             }
             unset($result);
         }
     }
     // headr tags output###########################################
     $output['page_title'] = $this->config_model->load('site_name') . $this->config_model->load('page_title_separator') . $this->lang->line('account_forget_userpass');
     // meta tag
     $output['page_metatag'][] = meta('Cache-Control', 'no-cache', 'http-equiv');
     $output['page_metatag'][] = meta('Pragma', 'no-cache', 'http-equiv');
     // link tag
     //$output['page_linktag'][] = link_tag( 'favicon.ico', 'shortcut icon', 'image/ico' );
     //$output['page_linktag'][] = link_tag( 'favicon2.ico', 'shortcut icon2', 'image/ico' );
     // script tag
     //$output['page_scripttag'][] = "<script type=\"text/javascript\" src=\"tinymcs.js\"></script>\n";
     //$output['page_scripttag'][] = "<script type=\"text/javascript\" src=\"fckkeditor.js\"></script>\n";
     // end headr tags output###########################################
     // output
     $this->load->view('account/forgetpw_view', $output);
 }
コード例 #25
0
ファイル: Public_Controller.php プロジェクト: unisexx/adf16
 function __construct()
 {
     parent::__construct();
     header('Content-type: text/html; charset=UTF-8');
     $this->template->title('Addfriend 2016');
     $this->template->set_theme('addfriend');
     $this->template->set_layout('layout');
     $this->template->title('หาเพื่อน หาแฟน หากิ๊ก หาคู่ หาเพื่อนเล่นเกม แลกไอดีไลน์ - Addfriend');
     // Set js
     $this->lang->load('admin');
     $this->template->append_metadata(js_notify());
     meta_description();
     $this->template->append_metadata(meta('keywords', "โสด,เหงา,LINE,instagram,facebook,whatsapp,BBM,Sticker,Sticker LINE,สติ๊กเกอร์,หาเพื่อน,หาแฟน,หากิ๊ก,หาคู่,แลกไอดีไลน์,หาเพื่อนไลน์,หาเพื่อน LINE,หาเพื่อน instagram,หาเพื่อน facebook,หาเพื่อน whatsapp,หาเพื่อน BBM,หาเพื่อนชาย,หาเพื่อนหญิง,หาเพื่อนเกย์,หาเพื่อนทอม,หาเพื่อนดี้,หาเพื่อนสาวประเภทสอง,หาเพื่อนหน้าตาดี,หาเพื่อนเล่นเกม,คุ้กกี้รัน,cookie run,เกมเศรษฐี,Let's Get Rich,LINE ranger"));
     // Set Language
     // if(!$this->session->userdata('lang')) $this->session->set_userdata('lang','th');
     //
     // if(@$this->session->userdata('lang') == "th"){
     // $this->lang->load('public','thai');
     // }elseif(@$this->session->userdata('lang') == "en"){
     // $this->lang->load('public','english');
     // }else{
     // $this->lang->load('public','china');
     // }
 }
コード例 #26
0
ファイル: login_view.php プロジェクト: Rundiz/vee-web-start
<?php

echo doctype("html5") . "\n";
?>
<html>
	<head>
		<?php 
echo meta('Content-type', 'text/html; charset=utf-8', 'equiv');
?>
		<title><?php 
echo isset($page_title) ? $page_title : "";
?>
</title>
		<?php 
if (isset($page_metatag) && is_array($page_metatag)) {
    echo "<!-- additional meta tag -->\n";
    foreach ($page_metatag as $key => $item) {
        echo $item;
    }
    echo "<!-- end additional meta tag -->\n";
}
?>
		
		<?php 
echo link_tag('client/themes/' . $this->config->item('usetheme') . '/style-sample.css');
// sample css.
if (isset($page_linktag) && is_array($page_linktag)) {
    echo "<!-- additional link tag -->\n";
    foreach ($page_linktag as $key => $item) {
        echo $item . "\n";
    }
コード例 #27
0
<?php

namespace Silverplate\Form;

// Optional: translate required messages to your language
meta('translation-field-required', 'This field is required.');
// These three are for summarization in e-mail messages
meta('translation-yes', 'Yes');
meta('translation-no', 'No');
meta('translation-field-empty', '[left blank]');
// Make an instance of a form
$form = new \Silverplate\Form();
// Then add some text fields to the form
$form->add('name', TextField::make('Full name', true));
$form->add('e-mail', TextField::make('E-mail address', true));
// The second parameter in Field constructor describes if a field is required
$form->add('phone', TextField::make('Your phone'));
// The third paramter in Field constructor specifies initial value for a field
$form->add('company', TextField::make('Company', false, 'n/a'));
// You can also add other types of fields
$form->add('message', TextareaField::make('Your message', true));
$form->add('topic', ChoiceField::make('Message topic', true)->choices(array('General inquiry', 'Job offer', 'I would love to speak to someone out there')));
$form->add('know-you', BooleanField::make('Do you know me?'));
// Or add a custom validator to a field
$form->add('question', TextField::make('2 + 2 =', true)->validate(function ($value) {
    if (trim($value) !== '4') {
        return 'This answer is not valid.';
    }
}));
// If form is valid, then we can send an e-mail
if ($_SERVER['REQUEST_METHOD'] == 'POST' && $form->valid()) {
コード例 #28
0
<?php

echo doctype();
?>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<?php 
echo meta($meta);
echo link_tag($style);
echo script($script);
?>
		<title><?php 
echo $titulo;
?>
</title>
		<script>
			jQuery(document).ready(function(){

			  
			   $("#close_modal").on("click",function(){
			  		$(".modal").fadeOut();
			   }); 
			   
			  <?php 
if (!empty($error) || !empty($messege)) {
    ?>
			  		$(".modal").fadeIn('slow');
					$(".modal-title").text('<?php 
    echo !empty($error) ? "Ops! Tivemos um problema ... " : "Sucesso !";
    ?>
');
コード例 #29
0
ファイル: Controller.php プロジェクト: eusonlito/web-deploy
 public function __construct(Router $router)
 {
     meta()->set('title', 'Web Deploy');
     template()->share(array('ROUTE' => $router->getRoute(), 'MODULES' => config('project')['modules']));
 }
コード例 #30
0
$site_name = $this->settings_model->getSiteName();
?>
<!-- 
    Basic Site's Information
-->
<meta charset="utf-8">
<?php 
echo meta('viewport', 'width=device-width, initial-scale=1.0');
?>
<title><?php 
echo $page_info['title'];
?>
</title>
<?php 
$metaData = array(array('name' => 'robots', 'content' => 'noindex, nofollow'), array('name' => 'keywords', 'content' => $page_info['meta_keywords']), array('name' => 'description', 'content' => $page_info['meta_description']), array('name' => 'application-name', 'content' => str_replace(' ', '_', html_escape($site_name))), array('name' => 'author', 'content' => 'Puncoz Nepal [http://www.puncoz.com]'));
echo meta($metaData);
?>

<!-- 
    FAVICON
-->
<?php 
echo link_tag('assets/admin/custom/img/favicon.ico', 'shortcut icon', 'image/icon');
?>

<!-- 
    Style Sheets
--> 
<?php 
echo link_tag('assets/vendor/bootstrap/css/bootstrap.min.css');
echo link_tag('assets/vendor/font-awesome/css/font-awesome.min.css');