Exemple #1
0
 public function detail($id = null)
 {
     if ($id === null) {
         redirect('/gallery', 'refresh');
     }
     $this->load->model('gallery_model', 'gallery');
     $data['gallery'] = $this->gallery->getSingleGallery($id);
     $data['images'] = $this->gallery->getGalleryImages($id);
     $data['title'] = site_title($data['gallery']->gallery_title);
     $this->load->view('gallery/gallery-detail', $data);
 }
Exemple #2
0
 /**
  * 默认首页
  */
 public function main()
 {
     if (u()->getUriInfo()->getUrlListLast() !== null) {
         $this->__load_404();
     } else {
         header("Content-Type: text/html; charset=utf-8");
         theme()->set_desc(site_title(false) . " - " . site_desc(false));
         theme()->set_keywords(site_keywords());
         $this->__view('comm/header.php');
         $this->__view('home/home.php');
         $this->__view('comm/footer.php');
     }
 }
Exemple #3
0
 function detail($id = null)
 {
     if ($id === null) {
         $this->uri->redirect(site_url() . 'store', 'refresh');
         //redirect them back to the store page.
     }
     $this->load->model('store_model');
     $data['pageTitle'] = $this->store_model->getProductTitle($id);
     $data['title'] = site_title($data['pageTitle']);
     $data['defaultImage'] = $this->store_model->getProductImage($id);
     //default iamge.
     $data['productImages'] = $this->store_model->getProductImages($id);
     $data['product'] = $this->store_model->getProduct($id);
     $this->load->view('store/product-detail', $data);
 }
Exemple #4
0
 function display()
 {
     current_page('page');
     if (!user('logged')) {
         return login_req();
     }
     $data = ldb_select_one('page', '*', input(1), 'name');
     if (!$data) {
         return core_error_404();
     }
     page_title($data['title']);
     site_title($data['title']);
     $out = '';
     $out .= $data['text'];
     return $out;
 }
Exemple #5
0
 /**
  * 单独页面
  * @param $page
  */
 public function page($page)
 {
     if (\ULib\Router::$begin_status) {
         lib()->load('project', 'menu')->add("project", new \ULib\Project($page, 0));
         lib()->add('menu', new \ULib\Menu(true));
         set_title(project()->title(), site_title(false));
         theme()->header_add("<script>var PM_PAGE_ID = " . project()->id() . ";</script>", 40);
         theme()->set_desc(project()->desc());
         theme()->set_keywords(project()->keywords());
         header("Content-Type:text/html; charset=utf-8");
         $this->__view('comm/header.php');
         $this->__view('project/page.php');
         $this->__view('comm/footer.php');
     } else {
         $this->__load_404();
     }
 }
Exemple #6
0
 public function create()
 {
     $this->add_header();
     $this->add(get_url(), gmdate(DATE_ATOM, time()), 'daily', '1.0', site_title(false) . " | " . site_desc(false));
     $page = db()->select("project", array('[><]page' => array('page_id' => 'id')), array('project.id' => 'id', 'project.name' => 'name', 'project.title' => 'title', 'project.desc' => 'desc', 'page.uptime' => 'time'), array('project.type' => 'page', 'ORDER' => 'sort'));
     foreach ($page as $v) {
         $this->add(get_url($v['name']), $this->date_convert($v['time']), 'weekly', '0.8', $v['title'] . " - " . site_title(false));
     }
     unset($page);
     $project = db()->select("project", array('[><]page' => array('page_id' => 'id')), array('project.id' => 'id', 'project.name' => 'name', 'project.title' => 'title', 'project.desc' => 'desc', 'page.uptime' => 'time'), array('project.type' => 'project', 'ORDER' => 'sort'));
     foreach ($project as $v) {
         $this->add(get_url($v['name']), $this->date_convert($v['time']), 'weekly', '0.7', $v['title'] . " - " . site_title(false));
         foreach (db()->select("item", array('[><]page' => array('page_id' => 'id')), array('item.name' => 'name', 'item.title' => 'title', 'item.desc' => 'desc', 'page.uptime' => 'time'), array('item.project_id' => $v['id'])) as $v2) {
             $this->add(get_url($v['name'], $v2['name']), $this->date_convert($v2['time']), 'monthly', '0.5', $v2['title'] . " - " . $v['title']);
         }
     }
     $this->add_footer();
 }
Exemple #7
0
function option_resources($preset = '')
{
    $qry = "SELECT * FROM sites WHERE ep_occi != '' ORDER BY cmf";
    $ret = myQuery($qry);
    $opts = "<option>::select a site::</option>";
    while ($row = myFetchRow($ret)) {
        //dd($row);
        $v = $row['id'];
        $t = site_title($row);
        if ($preset == $v) {
            $sel = " selected";
        } else {
            $sel = '';
        }
        $opts .= "<option value='{$v}'{$sel}>{$t}</option>";
    }
    return $opts;
}
Exemple #8
0
/**
 * 输出标题
 * @param bool $out
 * @return mixed
 */
function pm_title($out = true)
{
    $title = hook()->apply('pm_title_title', cfg()->get('theme', 'title'));
    $desc = hook()->apply('pm_title_title', cfg()->get('theme', 'desc'));
    if ($title === null) {
        $title = site_title(false);
    }
    if ($desc === null) {
        $desc = site_desc(false);
    }
    if (empty($desc)) {
        $out = hook()->apply('pm_title', $title);
    } else {
        $out = hook()->apply('pm_title', $title . " | " . site_name(false));
    }
    if ($out) {
        echo $out;
    }
    return $out;
}
Exemple #9
0
 protected function set_title_and_breadcrumbs($title = array(), $middle_breadcrumbs = array(), $member_obj = null, $module = null, $info = array(), $is_no_breadcrumbs = false, $is_no_title = false, $ogp_data = array())
 {
     $common = array('title' => FBD_SITE_NAME, 'description' => FBD_SITE_DESCRIPTION);
     $title_name = '';
     $this->template->title = '';
     if ($title) {
         list($title_name, $title_label) = Site_Controller::get_title_parts($title);
     }
     if (!$is_no_title && $title_name) {
         $this->template->title = View::forge('_parts/page_title', array('name' => $title_name, 'label' => $title_label));
         $common['title'] = $title_name;
     }
     $this->template->header_title = site_title($title_name);
     if ($info) {
         $this->template->header_info = View::forge('_parts/information', $info);
     }
     $this->template->breadcrumbs = $is_no_breadcrumbs ? array() : static::get_breadcrumbs($title_name, $middle_breadcrumbs, $member_obj, $member_obj ? $this->check_is_mypage($member_obj->id) : false, $module);
     if (!empty($ogp_data['title'])) {
         $common['title'] = $ogp_data['title'];
     }
     if (!empty($ogp_data['description'])) {
         $common['description'] = $ogp_data['description'];
     }
     if (!empty($ogp_data['image'])) {
         $common['image'] = $ogp_data['image'];
     }
     View::set_global('common', $common);
 }
Exemple #10
0
<meta name="keywords" content="<?php 
echo $site_keywords;
?>
" />
<meta name="google-site-verification" content="<?php 
echo $settings['services']['google_webmaster'];
?>
" />
<meta name="msvalidate.01" content="<?php 
echo $settings['services']['bing_webmaster'];
?>
" />

<!-- OpenGraph (Facebook) http://ogp.me -->
<meta property="og:title" content="<?php 
echo site_title($sub_title, $page_title, $site_title);
?>
"/>
<meta property="og:type" content="website" />
<meta property="og:image" content="<?php 
echo $site_image;
?>
"/>
<meta property="og:url" content="<?php 
echo current_url();
?>
"/>
<meta property="og:site_name" content="<?php 
echo config_item('site_title');
?>
"/>
Exemple #11
0
 public function register_hook()
 {
     $hook = hook();
     $hook->add('UserRegister_Register_before', function ($code) {
         if ($code === 0 && !allowed_register()) {
             return -11;
         }
         return $code;
     });
     switch (site_mode()) {
         case "https":
             if (!is_ssl()) {
                 header("Cache-Control: no-cache, must-revalidate");
                 header("Pragma: no-cache");
                 redirect("https://" . substr(URL_NOW, 6), "header", 301);
             }
             $hook->add('get_url', function () {
                 return site_url_ssl();
             });
             $hook->add("get_file_url", function () {
                 return site_static_url_ssl();
             });
             break;
         case "all":
             if (is_ssl()) {
                 $hook->add('get_url', function () {
                     return site_url_ssl();
                 });
                 $hook->add("get_file_url", function () {
                     return site_static_url_ssl();
                 });
             } else {
                 $hook->add('get_url', function () {
                     return site_url();
                 });
                 $hook->add("get_file_url", function () {
                     return site_static_url();
                 });
             }
             break;
         default:
             if (is_ssl()) {
                 header("Cache-Control: no-cache, must-revalidate");
                 header("Pragma: no-cache");
                 redirect("http://" . substr(URL_NOW, 7), "header", 301);
             }
             $hook->add('get_url', function () {
                 return site_url();
             });
             $hook->add("get_file_url", function () {
                 return site_static_url();
             });
     }
     $hook->add("UserRegister_CodeMsg", function ($msg, $code) {
         if ($code == -11) {
             return _("User register already closed.");
         }
         return $msg;
     });
     if (!login_captcha()) {
         //将验证码检测返回TRUE
         $hook->add("UserLogin_Captcha", function () {
             return true;
         });
     }
     if (email_notice()) {
         $hook->add('UserRegister_Register_success', function ($user_id) {
             lib()->load('MailTemplate');
             $user = User::getUser($user_id);
             $mt = new MailTemplate("new_user_registered.html");
             $mt->setUserInfo($user->getInfo());
             $mt->mailSend(site_title() . " Manager", admin_email());
         });
     }
     if (strtolower(default_avatar_config()) == "gravatar") {
         $hook->add("Avatar_convert", function ($avatar) {
             if (strtolower($avatar) == "{default}") {
                 return "{gravatar}";
             }
             return $avatar;
         });
     }
 }
Exemple #12
0
<meta name="application-name" content="<?php 
site_title();
?>
">
<link rel="icon" sizes="192x192" href="images/touch/chrome-touch-icon-192x192.png">
<!-- Add to homescreen for Safari on iOS --><meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Web Starter Kit">
<link rel="apple-touch-icon" href="images/touch/apple-touch-icon.png">
<!-- Tile icon for Win8 (144x144 + tile color) --><meta name="msapplication-TileImage" content="images/touch/ms-touch-icon-144x144-precomposed.png">
<meta name="msapplication-TileColor" content="#3372DF">
<meta name="theme-color" content="#3372DF">
<!-- Page styles -->
    <link rel="stylesheet" href="./system/appearance/system.css">
    <link rel="stylesheet" href="extras/themes/acupuncture/styles/main.css">
    <link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic|Signika:400,600' rel='stylesheet' type='text/css'>
</head>
<body id="nav_top">
    <header class="app-bar promote-layer"><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<div class="app-bar-container">
<button class="menu"><img src="<?php 
theme_location();
?>
images/hamburger.png" alt="Menu"></button><section class="app-bar-actions"><!-- Put App Bar Buttons Here --><!-- e.g <button><i class="icon icon-star"></i></button> --></section>

<h2 class="sc-content-title main-title"><?php 
site_title();
?>
</h2>
</div>
    </header><!-- HTML --><!-- HTML -->
Exemple #13
0
<?php

require 'inc/functions.php';
?>

<!doctype html>
<html>
<head>

	<meta charset="utf-8"/>
	<meta content="tekst" name="description" />
	<meta content="fjale kyce" name="keywords" />
	
	<title><?php 
site_title(' &rarr; ');
?>
</title>
	
	<link type="text/css" href="<?php 
echo BASEURL;
?>
/style.css" rel="stylesheet" media="screen" />

</head>
<body>

<div id="trupi" class="eperbashket">

<div id="logo">
	<img src="<?php 
echo BASEURL;
Exemple #14
0
 /**
  * 获取网站系统参数
  * @return array
  */
 private function getSystemParams()
 {
     return ['site_url' => site_url(), 'site_title' => site_title(), 'site_desc' => site_desc(), 'admin_email' => admin_email(), 'site_time' => date("Y-m-d H:i:s")];
 }
Exemple #15
0
<?php

// Change this to your timezone
date_default_timezone_set('America/Los_Angeles');
// Index
// --------------------------------------------------------------------------------
get('/index', function () {
    render('index', array('head_title' => site_title()));
});
// Login/Register
// --------------------------------------------------------------------------------
get('/login', function () {
    render('login', array('head_title' => 'Login'));
});
post('/login', function () {
    $email = from($_REQUEST, 'email');
    $password = from($_REQUEST, 'password');
    if (account_auth($email, $password)) {
        create_session($email);
        redirect();
    } else {
        redirect('/login?error=Incorrect email or password');
    }
});
get('/register', function () {
    render('register', array('head_title' => 'Register'));
});
post('/register', function () {
    $username = from($_REQUEST, 'username');
    $email = from($_REQUEST, 'email');
    $password = from($_REQUEST, 'password');
Exemple #16
0
function wp_title($sep = '|', $echo = true, $seplocation = '')
{
    $title = site_title(0);
    $title = apply_filters('wp_title', $title);
    if ($echo) {
        echo $title;
    }
    return $title;
}
Exemple #17
0
echo '<title>%TITLE%</title>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
echo '<style type="text/css">
body {text-decoration: none; font-family: arial; font-size: 15pt; margin: 5px; padding: 5px; background: #fff; color: #000;}
.a {background-color: #333; margin: 5px; padding: 5px; color: #fff; font-style: italic;}
.x {background-color: #eee; margin: 10px; padding: 15px;}
</style>';
echo '<link rel="shortcut icon" href="/favicon.ico" />';
echo '<meta name="keywords" content="%KEYWORDS%" />';
echo '<meta name="description" content="%DESCRIPTION%" />';
echo '<meta name="generator" content="Wap-Motor ' . MOTOR_VERSION . '" />';
echo '</head><body>';
echo '<!--Design by Vantuz (http://pizdec.ru)-->';
function amendment($skinxhtml)
{
    $skinxhtml = str_replace('images/img/act.gif', 'themes/lite/act.gif', $skinxhtml);
    $skinxhtml = str_replace('images/img/act1.gif', 'themes/lite/act.gif', $skinxhtml);
    $skinxhtml = str_replace('images/img/act2.gif', 'themes/lite/act.gif', $skinxhtml);
    $skinxhtml = str_replace('images/img/act3.gif', 'themes/lite/act.gif', $skinxhtml);
    $skinxhtml = str_replace('images/img/act_home.gif', 'themes/lite/act.gif', $skinxhtml);
    $skinxhtml = str_replace('<hr />', '<br />', $skinxhtml);
    return $skinxhtml;
}
ob_start('amendment');
echo '<div class="x" id="up">';
echo '<div class="a">' . site_title($php_self) . '</div>';
if ($config['rekhead'] == 1) {
    include_once DATADIR . "datamain/reklama_head.dat";
}
include_once BASEDIR . "includes/isset.php";
echo '<div>';
Exemple #18
0
 function login()
 {
     site_title(lang('login_t'));
     page_title(lang('login_t'));
     $out = '';
     // Try to login?
     if (@$_POST['sub_login']) {
         $mail = @$_POST['mail'];
         $pass = @$_POST['pass'];
         $red = @$_POST['red'];
         if (!$red) {
             $red = URL . '/';
         }
         // has user?
         $data = ldb_select('user', '*', '`mail`=\'' . ldb_escape($mail) . '\' AND `passwd`=\'' . md5(md5(md5($pass))) . '\' LIMIT 1');
         if (!$data) {
             // User is not found...
             // Drop cookie
             setcookie(cfg('auth_int_cookie_name'), '', time() - 86400, '/', COOKIE_DOMAIN);
             // Error message
             //core_error_lng('login_e_p');
             $out .= '<div class="error_div"><p>' . lang('login_e_p') . '</p></div><br/>';
         } else {
             $data = $data[0];
             // Status is OK?
             if ($data['status'] != 'ACTIVE') {
                 if ($data['status'] == 'NOT_ACTIVATED') {
                     // Not activated...
                     $out .= '<div class="error_div">' . lang('login_e_a') . '</div>';
                 }
                 if ($data['status'] == 'BANNED') {
                     // Not activated...
                     $out .= '<div class="error_div">' . lang('login_e_b') . '</div>';
                 }
             } else {
                 // User exists...
                 /*
                 // Generate LoginKey
                 $lk = sha1(md5($_SERVER['HTTP_USER_AGENT']).mt_rand().md5($mail).md5($pass).time());
                 
                 // Update DB
                 db_update_by_id('site_users', $data['id'], array('login_key'=>md5($lk),'last_login'=>time(),'last_ip'=>$_SERVER['REMOTE_ADDR']));
                 
                 // All ok, set cookie and redirect;
                 $c_data = base64_encode($data['id'].':'.base64_encode($lk));
                 setcookie (cfg('auth_int_cookie_name'), $c_data, time()+intval(cfg('auth_int_session_time')), '/', COOKIE_DOMAIN);
                 */
                 $this->create_session($data['id']);
                 $msg = lang('login_ok');
                 $msg = str_replace('{NAME}', $data['name'], $msg);
                 redirect_msg($red, $msg);
                 exit;
             }
         }
     }
     // Template
     /*$tpl = new tpl ('login_form');
     		$tpl->v ('post',array_map('htmlspecialchars',$_POST));
     		$out .= $tpl->get ();*/
     $fg = new lform();
     $fg->add_title('Авторизироваться в системе');
     $fg->add_input('text', lang('register_mail'), 'mail');
     $fg->add_input('password', lang('register_password'), 'pass');
     $fg->add_input('submit', '', 'sub_login', 'Войти');
     $fg->add_input('raw', '<tr><td align="center" colspan="2" class="formgen_input_area"><a href="' . URL . '/user/lost_password/">' . lang('t_lostp') . '</a> / <a href="' . register_link() . '">' . lang('t_register') . '</a></td></tr>');
     $out .= $fg->get_form();
     return $out;
 }
Exemple #19
0
 function contact()
 {
     $this->load->helper('site_helper');
     $this->form_validation->set_rules('name', 'Name', 'required|max_length[255]');
     $this->form_validation->set_rules('question', 'Question', 'required');
     $this->form_validation->set_rules('email', 'Email', 'required|valid_email|max_length[255]');
     $this->form_validation->set_rules('phone', 'Phone', '');
     $this->form_validation->set_error_delimiters('<br /><span class="error">', '</span>');
     if ($this->form_validation->run() == FALSE) {
         $data['title'] = site_title('Contact us');
         $data['pageTitle'] = "Contact us";
         //we are going to display the form.
         $this->load->view('contact', $data);
     } else {
         // build array for the model
         if ($this->input->post('phone_number') != '') {
             exit;
         }
         $form_data = array('name' => set_value('name'), 'question' => set_value('question'), 'email' => set_value('email'), 'phone' => set_value('phone'));
         $emailMessage = "<p>A contact submission was submitted below is there information</p><br />";
         $emailMessage .= "<strong>Name</strong>: " . $form_data['name'] . "<br />";
         $emailMessage .= "<strong>Email</strong>: " . $form_data['email'] . "<br />";
         $emailMessage .= "<strong>Phone</strong>: " . $form_data['phone'] . "<br />";
         $emailMessage .= "<strong>Question/Comment</strong>: " . $form_data['question'];
         // run insert model to write data to db
         $this->load->library('email');
         $recipients = getFormRecipients();
         $emailTos = explode(',', $recipients->settings_value);
         foreach ($emailTos as $to) {
             $this->email->from('*****@*****.**', 'CVSi Website Contact');
             $this->email->to($to);
             $this->email->mailtype = 'html';
             $this->email->subject('Website Contact Inquiry');
             $this->email->message($emailMessage);
             $this->email->send();
         }
         // run insert model to write data to db
         if ($this->form_model->SaveForm($form_data) == TRUE) {
             redirect('page/contact-success-page');
             // or whatever logic needs to occur
         } else {
             echo 'An error occurred saving your information. Please try again later';
             // Or whatever error handling is necessary
         }
     }
 }
        $tag = 'ours';
    }
    if (!($plugins = plugins_get_by_tag($tag))) {
        Flight::notFound();
    }
    Flight::render($view, array('tag' => $tag, 'plugins' => $plugins));
});
/**
 * 404
 */
Flight::map('notFound', function () {
    site_title('404 - not found :(');
    $request = Flight::request();
    // see if a page exists
    if ($page_info = page_exists($request->url)) {
        site_title($page_info['title']);
        if (null !== $page_info['description']) {
            site_description($page_info['description']);
        }
        Flight::render($page_info['view']);
        die;
    }
    // see if there's a valid permanent redirect, and if there is send the user to the new location
    if ($redirect_url = redirect_destination($request->url)) {
        Flight::redirect($redirect_url, 301);
        die;
    }
    header('HTTP/1.0 404 Not Found');
    site_header_title('404 :(');
    site_description('<a href="' . path() . '">Visit the homepage <i class="fa fa-arrow-right"></i></a>');
    Flight::render('404.php');
                ?>
" content="<?php 
                echo $value;
                ?>
" />
<?php 
            }
        }
    }
}
/**
 * Check if Gumroad is enabled and if it is then add the Gumroad script
 */
function site_enable_purchase()
{
    if (!DISABLE_GUMROAD) {
        site_script('https://gumroad.com/js/gumroad.js', true);
    }
}
// Set Defaults
// default site description
site_description('Designing <strong>Professional WordPress Themes</strong> since 2007.');
// default site title
site_title('Pro Theme Design - WordPress Themes and Plugins');
// default site page header title
site_header_title('Pro Theme Design');
// default site og:type
site_meta('og:type', 'website');
// default site scripts
site_script('https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js');
site_script(js_path('main.min.js'));
function html_doc_title()
{
    return single_post_title() ? single_post_title() . " - " . site_title() : site_title();
}
Exemple #23
0
function wp_title()
{
    echo site_title();
}
Exemple #24
0
function core_error_login()
{
    site_title(lang('403_e_t'));
    $tpl = new ltpl('ge_403');
    $GLOBALS['core']->global_msg = $tpl->get();
}
Exemple #25
0
<!DOCTYPE html>
<html lang="en">

<head>
    <title><?php 
echo single_post_title();
?>
 <?php 
echo site_title();
?>
</title>
    <link rel="alternate" type="application/rss+xml" title="<?php 
echo site_title();
?>
's Feed" href="/feed" />
    <link rel="stylesheet" href="/assets/reset.css">
    <link rel="stylesheet" href="/assets/common.css">
    <link rel="stylesheet" href="/assets/main.css">
    <link rel="stylesheet" href="/assets/blog.css">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <script src="/assets/vendor/jquery-1.11.2.min.js"></script>


    <?php 
include 'prismic.php';
?>

    <?php 
include 'skin/blog.php';
?>
Exemple #26
0
 /**
  * 获取标题
  * @return string
  */
 public function getTitle()
 {
     if (empty($this->title) && !empty($this->breadcrumb_title)) {
         return $this->breadcrumb_title . " - " . site_title();
     } else {
         if (!empty($this->title) && empty($this->breadcrumb_title)) {
             return $this->title . " - " . site_title();
         } else {
             if (empty($this->title) && empty($this->breadcrumb_title)) {
                 return site_title() . " - " . site_desc();
             }
         }
     }
     return $this->breadcrumb_title . " - " . $this->title . " | " . site_title();
 }