當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Core::display方法代碼示例

本文整理匯總了PHP中Core::display方法的典型用法代碼示例。如果您正苦於以下問題:PHP Core::display方法的具體用法?PHP Core::display怎麽用?PHP Core::display使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Core的用法示例。


在下文中一共展示了Core::display方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: run

 public function run()
 {
     $static_found = false;
     foreach (Core::get_system('static_views') as $view) {
         /** Verify a static template for the url does not exist */
         $dir = opendir(Core::get_system('views') . '/' . $view);
         while ($file = readdir($dir)) {
             /** This is a template file that has a url specific extension */
             $exploded = explode('.', $file);
             if (strpos($file, '.tpl') && $exploded[1] === current(Core::get_args())) {
                 $static_found = true;
             }
         }
         closedir($dir);
         if ($static_found) {
             break;
         }
     }
     /** Handle 404 Errors */
     if (current(Core::get_args()) !== 'default' && $static_found === false) {
         Core::error('404');
     } else {
         /** Display the default page or 404*/
         Core::display();
     }
 }
開發者ID:hoelzro,項目名稱:Bifrost,代碼行數:26,代碼來源:default.ctrl.php

示例2: run

 /** Default test functionality */
 public function run()
 {
     $value = Core::get_args(1);
     $use = array('date', 'email', 'ip', 'url', 'password', 'username', 'name', 'alpha', 'numeric', 'int', 'float', 'alphanumeric');
     $results = array();
     foreach (get_class_methods(get_class($this)) as $method) {
         if (method_exists($this, $method) && in_array($method, $use)) {
             $results[$method] = $this->{$method}($value);
         }
     }
     Core::set_response($results);
     Core::display('json');
 }
開發者ID:hoelzro,項目名稱:Bifrost,代碼行數:14,代碼來源:validate.ctrl.php

示例3: foreach

    foreach ($itemsdb as $item) {
        $val = explode("=", $item);
        $opvalue += $allitems[$val[0]] * $val[1];
    }
    $opvalue = number_format($opvalue, 0);
    // Display to the user
    $core->assign("opdate", $opdate);
    $core->assign("players", $players);
    $core->assign("items", $itemsdisplay);
    $core->assign("notes", $notes);
    $core->assign("opvalue", $opvalue);
}
$result = $core->SQL("SELECT * FROM `operations_groups` WHERE Active = 1 ORDER BY `DisplayOrder`, `GroupID`");
while ($row = mysql_fetch_assoc($result)) {
    $ogroupid[$row['id']] = $row['id'];
    $ogroupName[$row['id']] = $core->SQLUnEscape($row['Name']);
    $ogroupSubtext[$row['id']] = $core->SQLUnEscape($row['Subtext']);
    $ogroupGroupID[$row['id']] = $row['GroupID'];
    $ogroupDisplayOrder[$row['id']] = $row['DisplayOrder'];
    $ogroupCheckbox[$row['id']] = $row['Checkbox'];
}
$core->assign("ogroupid", $ogroupid);
$core->assign("ogroupName", $ogroupName);
$core->assign("ogroupSubtext", $ogroupSubtext);
$core->assign("ogroupGroupID", $ogroupGroupID);
$core->assign("ogroupDisplayOrder", $ogroupDisplayOrder);
$core->assign("ogroupCheckbox", $ogroupCheckbox);
$core->assign("action", $action);
$core->assign("result", @$_GET["result"]);
$core->display($core->PlugInPath . "payoutsubmission/payoutsubmission.tpl");
開發者ID:Covert-Inferno,項目名稱:eve-corp-portal,代碼行數:30,代碼來源:index.php

示例4: cmp

    $ops = array();
    $total = 0;
    while ($row = mysql_fetch_assoc($result)) {
        $opvalue = 0;
        $players = array();
        $playersdb = explode(",", $row["Players"]);
        foreach ($playersdb as $player) {
            $players[] = $names[$player];
        }
        $items = array();
        $itemsdb = explode(",", $row["Items"]);
        foreach ($itemsdb as $item) {
            $val = explode("=", $item);
            $items[$val[0]] = $val[1];
            $opvalue += $allitems[$val[0]] * $val[1];
        }
        $total += $opvalue;
        $opvalue = number_format($opvalue, 0);
        $ops[] = array("ID" => $row["id"], "Value" => $opvalue, "Leader" => $names[$row["Leader"]], "Players" => implode(",", $players), "Date" => $core->GMTToLocal($row["Date"]), "OpDate" => $row["OpDate"], "Notes" => $core->SQLUnEscape($row["Notes"]));
    }
    $total = number_format($total, 0);
    $core->assign("total", $total);
    $core->assign("ops", $ops);
    $core->assign("opcount", count($ops));
}
$core->assign("action", $action);
$core->display($core->PlugInPath . "payoutmanagement/payoutmanagement.tpl");
function cmp($a, $b)
{
    return strcasecmp($a[1], $b[1]);
}
開發者ID:Covert-Inferno,項目名稱:eve-corp-portal,代碼行數:31,代碼來源:index.php

示例5: elseif

        $result = 4;
    } elseif ($_POST["password1"] != $_POST["password2"]) {
        $result = 5;
    } else {
        $result = $cms->CoreSQL("SELECT * FROM users WHERE Name='" . $cms->SQLEscape($_POST["username"]) . "' OR FIND_IN_SET('" . $cms->SQLEscape($_POST["username"]) . "', Alts) LIMIT 1");
        if (mysql_num_rows($result) == 0) {
            $result = 6;
        } else {
            $res = $cms->GetUserCharacters($_POST["apiuserid"], $_POST["apikey"]);
            if ($res === FALSE) {
                $result = 2;
            } elseif (empty($res)) {
                $result = 3;
            } elseif (count($res) > 0) {
                foreach ($res as $char) {
                    if ($char["Name"] == $_POST["username"]) {
                        $result = 8;
                        $cms->CoreSQL("UPDATE users SET Password='" . md5($_POST["password1"]) . "' WHERE Name='" . $cms->SQLEscape($_POST["username"]) . "' OR FIND_IN_SET('" . $cms->SQLEscape($_POST["username"]) . "', Alts) LIMIT 1");
                        break;
                    }
                }
                if ($result != 8) {
                    $result = 6;
                }
            }
        }
    }
}
$cms->assign('result', $result);
$cms->display('newpassword.tpl');
開發者ID:Covert-Inferno,項目名稱:eve-corp-portal,代碼行數:30,代碼來源:newpassword.php

示例6: elseif

            $cms->assign("allusers", $cms->GetRegisteredUserNames());
        }
    }
} elseif ($step == 3) {
    $cms->assign("charid", $_POST["char"]);
    $cms->assign("charname", $_POST["name_" . $_POST["char"]]);
    $cms->assign("corpname", $_POST["corp_" . $_POST["char"]]);
    $cms->assign("corpticker", $_POST["corpticker_" . $_POST["char"]]);
    $cms->assign("corpid", $_POST["corpid_" . $_POST["char"]]);
    if ($cms->CharacterIDExists($_POST["char"])) {
        $res = $cms->GetUserCharacters($_POST["apiuserid"], $_POST["apikey"]);
        $cms->assign("characters", $res);
        $cms->assign("allusers", $cms->GetRegisteredUserNames());
        $result = 8;
        $step = 2;
    }
} elseif ($step == 4) {
    if (empty($_POST["password1"]) || empty($_POST["password2"])) {
        $result = 6;
        $step = 3;
    } elseif ($_POST["password1"] != $_POST["password2"]) {
        $result = 7;
        $step = 3;
    } else {
        $cms->RegisterNewUser($_POST["apiuserid"], $_POST["apikey"], $_POST["charid"], $_POST["charname"], $_POST["password1"], $_POST["corpid"], $_POST["corpname"], $_POST["corpticker"]);
    }
}
$cms->assign("step", $step);
$cms->assign("result", $result);
$cms->display('register.tpl');
開發者ID:Covert-Inferno,項目名稱:eve-corp-portal,代碼行數:30,代碼來源:register.php

示例7: error

 public static function error($type)
 {
     self::run_hook('core_error', array($type));
     switch ($type) {
         case '403':
             self::run_hook('core_error_403', array($type));
             header('HTTP/1.0 403 Forbidden');
             Core::set_args(array('403'));
             Core::display();
             break;
         case '404':
             self::run_hook('core_error_404', array($type));
             header('HTTP/1.0 404 Not Found');
             Core::set_args(array('404'));
             Core::display();
             break;
     }
 }
開發者ID:hoelzro,項目名稱:Bifrost,代碼行數:18,代碼來源:core.php

示例8: Core

<?php

require_once '../core/core.class.php';
$cms = new Core();
if (!$cms->AccessCheck()) {
    header("Location: access.php");
    exit;
}
$article = $cms->ReadArticle(3);
$cms->assign("quickinfo", $article);
$cms->display('quickinfo.tpl');
開發者ID:Covert-Inferno,項目名稱:eve-corp-portal,代碼行數:11,代碼來源:quickinfo.php

示例9: elseif

            $cms->Goto("articles.php");
        }
    } elseif ($_POST["submit"] == "Delete" && is_numeric(@$_POST["id"])) {
        $cms->DeleteArticle($_POST["id"]);
        $cms->Goto("articles.php");
    } else {
        $cms->Goto("articles.php");
    }
} elseif ($action == "newcomment" && is_numeric(@$_POST["article"])) {
    $id = $_POST["article"];
    $text = @$_POST["text"];
    if (!empty($text)) {
        $cms->NewArticleComment($id, $text);
    }
    $cms->Goto("articles.php?read=" . $id);
}
if (!isset($_POST["readaccess"])) {
    $_POST["readaccess"] = 2;
}
if (!isset($_POST["writeaccess"])) {
    $_POST["writeaccess"] = 4;
}
$cms->assign("action", $action);
$cms->assign("result", $result);
$cms->assign("id", @$_POST["id"]);
$cms->assign("title", @$_POST["title"]);
$cms->assign("text", @$_POST["text"]);
$cms->assign("readaccess", @$_POST["readaccess"]);
$cms->assign("writeaccess", @$_POST["writeaccess"]);
$cms->display('articles.tpl');
開發者ID:Covert-Inferno,項目名稱:eve-corp-portal,代碼行數:30,代碼來源:articles.php

示例10: search

 public function search()
 {
     /** Do we have a search string and a model to search? */
     if (isset($_GET['query']) && isset($this->model)) {
         $query = urldecode($_GET['query']);
         $model = Model::load($this->model);
         $search_fields = array();
         foreach ($model->getSchema() as $key => $val) {
             foreach ($val as $k => $v) {
                 if ($k == 'search' && $v) {
                     $search_fields[] = $key;
                     break;
                 }
             }
         }
         $search_on = array();
         foreach ($_GET as $key => $value) {
             if (in_array($key, $search_fields)) {
                 $search_on[] = $key;
             }
         }
         if (count($search_on) === 0) {
             $search_on = $search_fields;
         }
         $where = array();
         foreach ($search_on as $key) {
             $where[$key] = $query;
         }
         Core::set_response($model->get(array('where' => $where, 'search' => true)));
         Core::display('json');
     }
 }
開發者ID:hoelzro,項目名稱:Bifrost,代碼行數:32,代碼來源:controller.ctrl.php

示例11: Core

<?php

require_once '../core/core.class.php';
$cms = new Core();
if (isset($_GET["delete"]) && is_numeric(@$_GET["delete"]) && $cms->CurrentUser()->HasPortalRole(User::MDYN_Administrator)) {
    $cms->CoreSQL("DELETE FROM feedback WHERE id=" . $_GET["delete"] . " LIMIT 1");
    $cms->Goto("feedback.php");
} elseif ($cms->CurrentUser()->HasPortalRole(User::MDYN_Administrator)) {
    $feedbacks = array();
    $result = $cms->CoreSQL("SELECT * FROM feedback");
    while ($row = mysql_fetch_assoc($result)) {
        $feedbacks[] = array($cms->SQLUnEscape($row["Name"]), $cms->SQLUnEscape($row["EMail"]), $cms->SQLUnEscape($row["APIUserID"]), $cms->SQLUnEscape($row["APIKey"]), $cms->SQLUnEscape($row["Notes"]), $row["id"], $cms->GMTToLocal($row["Date"]));
    }
    $cms->assign("feedbacks", $feedbacks);
} elseif (@$_GET["result"] == "1") {
    $cms->assign("result", 1);
} elseif (@$_POST["submit"] == "Submit") {
    $query = "INSERT INTO feedback (Date,Name,Email,APIUserID,APIKey,Notes) VALUES (";
    $query .= "'" . $cms->GMTTime() . "',";
    $query .= "'" . $cms->SQLEscape($_POST["name"]) . "',";
    $query .= "'" . $cms->SQLEscape($_POST["email"]) . "',";
    $query .= "'" . $cms->SQLEscape($_POST["apiuserid"]) . "',";
    $query .= "'" . $cms->SQLEscape($_POST["apikey"]) . "',";
    $query .= "'" . $cms->SQLEscape($_POST["notes"]) . "')";
    $cms->CoreSQL($query);
    $cms->Goto("feedback.php?result=1");
}
$cms->display('feedback.tpl');
開發者ID:Covert-Inferno,項目名稱:eve-corp-portal,代碼行數:28,代碼來源:feedback.php

示例12: Core

<?php

require_once '../core/core.class.php';
$cms = new Core();
$cms->display('notfound.tpl');
開發者ID:Covert-Inferno,項目名稱:eve-corp-portal,代碼行數:5,代碼來源:notfound.php

示例13: GetSkillInTraining

    // Online characters
    $onlinechars = "";
    $chars = $cms->GetOnlineCharacters();
    if (!empty($chars)) {
        $onlinechars = "<p>";
        foreach ($chars as $id => $char) {
            $onlinechars .= "<a href=\"profile.php?user=" . $id . "\">" . $char . "</a><br />";
        }
        $onlinechars .= "</p>";
    }
    $cms->assign('onlinechars', $onlinechars);
    // Plug-in XML feeds
    $feeds = $cms->ReadPlugInFeedbacks();
    $cms->assign('pluginfeeds', $feeds);
}
$cms->display('home.tpl');
// *******************************************************
// Returns the skill in training
// *******************************************************
function GetSkillInTraining()
{
    global $cms;
    if ($cms->CurrentUser()->IsGuest) {
        return "";
    }
    $raw = $cms->APIQuery("http://api.eve-online.com/char/SkillInTraining.xml.aspx");
    if ($raw == FALSE) {
        return array(0, "<p>Could not connect to the API server.</p>");
    }
    $xml = new SimpleXMLElement($raw);
    if ((int) $xml->error['code'] > 0) {
開發者ID:Covert-Inferno,項目名稱:eve-corp-portal,代碼行數:31,代碼來源:home.php

示例14: Core

<?php

require_once '../core/core.class.php';
$cms = new Core();
$article = $cms->ReadArticle(2);
$cms->assign("policies", $article);
$cms->display('policies.tpl');
開發者ID:Covert-Inferno,項目名稱:eve-corp-portal,代碼行數:7,代碼來源:policies.php

示例15: changeprice

        $eveprices[] = array("UnitPrice" => number_format($unit, 2), "Quantity" => number_format($row["Quantity"], 0), "Cost" => number_format($price, 0), "EveTypeID" => $row["EveTypeID"], "Name" => $core->SQLUnEscape($row["Name"]), "Icon" => $row["Icon"]);
    }
    mysql_free_result($result);
    $core->assign("eveprices", $eveprices);
    $core->assign("totaleveprice", number_format($total));
} elseif ($action == "editdone") {
    if ($_POST["submit"] == "Save") {
        $id = $_POST["id"];
        $price = $_POST["price"];
        $allyprice = $_POST["allyprice"];
        $core->SQL("UPDATE production_items SET Price=" . $price . ",AlliancePrice=" . $allyprice . " WHERE id=" . $id . " LIMIT 1");
    }
    $core->Goto("index.php");
}
$core->assign('action', $action);
$core->display($core->PlugInPath . "productionprices/productionprices.tpl");
// *************************************************************************
// Update's the Production Item's Price in the "production_items" database
// *************************************************************************
function changeprice($id, $percent, $group)
{
    global $core;
    //  $id = $_GET["edit"];
    $result = $core->SQL("SELECT EveTypeID,Name,Price,AlliancePrice,GroupName FROM production_items WHERE id=" . $id);
    $row = mysql_fetch_assoc($result);
    $eveid = $row["EveTypeID"];
    $core->assign("id", $id);
    $core->assign("name", $core->SQLUnEscape($row["Name"]));
    $core->assign("groupname", $core->SQLUnEscape($row["GroupName"]));
    $core->assign("price", number_format($row["Price"], 0, '.', ''));
    $core->assign("allyprice", number_format($row["AlliancePrice"], 0, '.', ''));
開發者ID:Covert-Inferno,項目名稱:eve-corp-portal,代碼行數:31,代碼來源:index.php


注:本文中的Core::display方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。