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


PHP site类代码示例

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


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

示例1: createSite

/**
 * 
 * SITE
 */
function createSite($id = "site")
{
    $site = new site("reservoirlog CMS");
    $site->changeID($id);
    $site->layout = "default";
    $site->style = "default";
    $site->save();
    //$site->display();
    return $site;
}
开发者ID:raphael-betemps,项目名称:reservoirlog-php,代码行数:14,代码来源:install.php

示例2: get_site

 function get_site()
 {
     $site = new site();
     $site_array = $site::all();
     if (empty($site_array)) {
         $site_array = $site->set_default();
     } else {
         $site_array = $site_array[0];
     }
     return $site_array;
 }
开发者ID:hscale,项目名称:BlastPad,代码行数:11,代码来源:site_builder_class.php

示例3: created

 function created()
 {
     $site = new site();
     $site->name = $_POST['name'];
     $site->bonus_type = $_POST['bonus_type'];
     $site->bonus_max = $_POST['bonus_max'];
     $site->convert_rate = $_POST['convert_rate'];
     $site->affiliate_url = "";
     $site->url = "";
     $site->comment = $_POST['comment'];
     $site->create();
     header("location: index.php");
 }
开发者ID:daivan,项目名称:clearbonus,代码行数:13,代码来源:sites_controller.php

示例4: __construct

 /**
  * Template loading and setup routine.
  */
 public function __construct()
 {
     parent::__construct();
     // checke request is ajax
     $this->ajax_request = request::is_ajax();
     // Load the template
     $this->template = new View($this->template);
     if ($this->auto_render == TRUE) {
         Event::add('system.post_controller', array($this, '_render'));
     }
     /**
      * 判断用户登录情况
      */
     if (isset($_REQUEST['session_id'])) {
         $session = Session::instance($_REQUEST['session_id']);
         $manager = role::get_manager($_REQUEST['session_id']);
     } else {
         $session = Session::instance();
         $manager = role::get_manager();
     }
     /* 当前请求的URL */
     $current_url = urlencode(url::current(TRUE));
     //当前用户管理的站点的ID
     $this->site_id = site::id();
 }
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:28,代码来源:kc_template.php

示例5: cash

 public function cash()
 {
     $this->live_cash = 0;
     $this->played = 0;
     $this->cash = 0;
     $this->transactions = transaction::from_account($this->account_id);
     # här kommer transaktionerna
     foreach ($this->transactions as $transaction) {
         $transactions[] = $transaction;
         if ($transaction->type == "cash_in") {
             $this->cash += $transaction->amount;
         } elseif ($transaction->type == "bonus") {
             $this->cash += $transaction->amount;
         } elseif ($transaction->type == "cash_out") {
             $this->cash -= $transaction->amount;
         }
     }
     # här kommer betsen
     $this->bets = bet::from_account($this->account_id);
     foreach ($this->bets as $bet) {
         $bet->match = match::from_id($bet->match_id);
         $bet->account = account::from_id($bet->account_id);
         $bet->account->site = site::from_id($bet->account->site_id);
         $this->played += $bet->bet;
         if ($bet->match->result == "undecided") {
             $this->live_cash += $bet->bet;
             $this->cash -= $bet->bet;
         } else {
             $this->cash -= $bet->bet;
             $this->cash += $bet->result;
         }
     }
     return $this->cash;
 }
开发者ID:daivan,项目名称:clearbonus,代码行数:34,代码来源:accounts_model.php

示例6: index

 public function index()
 {
     $route_data = Myroute::instance()->get();
     if ($_POST) {
         $site_next_flow = site::site_next_flow($this->current_flow);
         $submit_target = intval($this->input->post('submit_target'));
         if (Myroute::instance()->edit($_POST)) {
             //判断添加成功去向
             switch ($submit_target) {
                 case 2:
                     remind::set(Kohana::lang('o_global.update_success'), $site_next_flow['url'], 'success');
                 default:
                     remind::set(Kohana::lang('o_global.update_success'), 'site/route', 'success');
             }
         } else {
             remind::set(Kohana::lang('o_global.update_error'), 'site/route');
         }
     }
     $this->template->content = new View("site/route_edit");
     $this->template->content->is_modify = 0;
     if ($this->manager_is_admin == 1) {
         $this->template->content->is_modify = 1;
     }
     $this->template->content->data = $route_data;
     $this->template->content->site_id = $this->site_id;
 }
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:26,代码来源:route.php

示例7: get_member_list

 private function get_member_list()
 {
     // Call site settings for stored roster & member ranks to track
     $siteSettings = site::setting();
     // Decode JSON from stored roster data
     $roster = json_decode($siteSettings[0]['fullRoster'], true);
     $data = array();
     // Decode JSON from stored roster ranks
     $ranks = json_decode($siteSettings[0]['rosterRanks'], true);
     $filterRanks = array();
     // Ranks to track
     foreach ($ranks as $key => $value) {
         try {
             // echo $key . ' == ' . $value['track'] . '<br/>';
             if ($value['track']) {
                 $filterRanks[] = $key;
             }
         } catch (Exception $e) {
             //
         }
     }
     foreach ($roster['members'] as $key => $character) {
         // echo var_dump($character['character']);
         // echo $character['character']['name'];
         if (in_array($character['rank'], $filterRanks)) {
             $data[] = $character['character']['name'];
         }
     }
     json::resp(array('success' => true, 'data' => $data));
 }
开发者ID:TheDoxMedia,项目名称:pgs,代码行数:30,代码来源:attendance.worker.php

示例8: add

 public function add()
 {
     if ($_POST) {
         //标签过滤
         tool::filter_strip_tags($_POST, array('content'));
         $site_next_flow = site::site_next_flow($this->current_flow);
         $submit_target = intval($this->input->post('submit_target'));
         $faq = Myfaq::instance();
         if ($faq->add($_POST)) {
             //判断添加成功去向
             switch ($submit_target) {
                 case 1:
                     remind::set(Kohana::lang('o_global.add_success'), 'site/faq/add', 'success');
                 case 2:
                     remind::set(Kohana::lang('o_global.add_success'), $site_next_flow['url'], 'success');
                 default:
                     remind::set(Kohana::lang('o_global.add_success'), 'site/faq', 'success');
             }
         } else {
             remind::set(Kohana::lang('o_global.add_error'), 'site/faq/add');
         }
     }
     $this->template->content = new View("site/faq_add");
     $this->template->content->title = "site faq add";
 }
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:25,代码来源:faq.php

示例9: check_streaks

 private function check_streaks()
 {
     $users = ORM::factory('User')->where('current_streak', '>', 0)->find_all();
     if ((bool) $users->count()) {
         foreach ($users as $user) {
             $last = $user->pages->where('type', '=', 'page')->find();
             if ($last->loaded()) {
                 $nextday = site::day_slug(strtotime('+1 day', strtotime($last->day)));
                 $today = site::day_slug($user->timestamp());
                 $tomorrow = site::day_slug(strtotime('+1 day', $user->timestamp()));
                 if ($nextday != $today && $nextday != $tomorrow) {
                     $user->current_streak = 0;
                     $user->validation_required(false)->save();
                     if ($user->doing_challenge()) {
                         $user->fail_challenge();
                     }
                 }
             } else {
                 if ($user->doing_challenge()) {
                     $start = $user->challenge->start;
                     if ($user->timestamp() - $start > 24 * 60 * 60) {
                         $user->fail_challenge();
                     }
                 }
             }
         }
     }
 }
开发者ID:artbypravesh,项目名称:morningpages,代码行数:28,代码来源:Userstreaks.php

示例10: template

 public static function template($file = '')
 {
     $template = ZOTOP_PATH_THEMES . DS . site::theme() . DS . 'template';
     if (!empty($file)) {
         $template .= DS . str_replace('/', DS, trim($file, '/'));
     }
     return $template;
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:8,代码来源:site.php

示例11: __construct

 /**
  * 构造方法
  */
 public function __construct()
 {
     parent::__construct();
     if ($this->is_ajax_request()) {
         $this->template = new View('layout/default_json');
     }
     $this->site_id = site::id();
 }
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:11,代码来源:sitemap.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     $this->site_id = site::id();
     if ($this->site_id <= 0) {
         die(Kohana::lang('o_global.access_denied'));
     }
 }
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:8,代码来源:update.php

示例13: success

 }
 public static function success($note, $redirect = false)
 {
     self::add('success', $note);
     if ($redirect) {
         site::redirect($redirect);
         die;
     }
开发者ID:artbypravesh,项目名称:morningpages,代码行数:8,代码来源:notes.php

示例14: printOne

 public function printOne($sitePhone)
 {
     $siteName = site::GET($sitePhone->siteID)->name;
     $phoneName = phone::GET($sitePhone->phoneID)->name;
     echo "<table>";
     echo "<tr><td><b>\tСайт\t</b></td><td><a   href=\"/site/view/{$siteEmail->siteID}\">\t{$siteName}\t</a></td></tr>";
     echo "<tr><td><b>\tТелефон\t</b></td><td><a href=\"/phone/view/{$siteEmail->emailID}\">\t{$phoneName}\t</a></td></tr>";
     echo "</table>";
 }
开发者ID:Tacit007,项目名称:Tacit007-php-framework,代码行数:9,代码来源:sitePhone.php

示例15: GET

 public function GET($id)
 {
     if (!site::IFDELETED($id)) {
         $getQuery = "SELECT \r\n\t\t\t\t\tid, \r\n\t\t\t\t\tconvert(varchar(max), name) as name,\r\n\t\t\t\t\thostingID, \r\n\t\t\t\t\tmanagerID, \r\n\t\t\t\t\tregistratorID\r\n\t\t\t\tFROM \r\n\t\t\t\t\t[dbo].[site] \r\n\t\t\t\tWHERE \r\n\t\t\t\t\tid={$id};";
         $row = mssql_fetch_array(mssql_query($getQuery));
         $result = new site($row["id"], $row["name"], $row["hostingID"], $row["managerID"], $row["registratorID"]);
         return $result;
     }
 }
开发者ID:Tacit007,项目名称:Tacit007-php-framework,代码行数:9,代码来源:site.php


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