本文整理汇总了PHP中A::NotFound方法的典型用法代码示例。如果您正苦于以下问题:PHP A::NotFound方法的具体用法?PHP A::NotFound怎么用?PHP A::NotFound使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类A
的用法示例。
在下文中一共展示了A::NotFound方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Router
/**
* Маршрутизатор URL.
*
* @param array $uri Элементы полного пути URL.
*/
function Router($uri)
{
foreach ($uri as $param) {
if (preg_match("/^(.+)\\.html\$/", $param, $match)) {
if ($this->album = A::$DB->getRow("SELECT * FROM " . SECTION . "_albums WHERE idcat={$this->idcat} AND urlname='{$match[1]}' AND active='Y'")) {
$this->idalb = $this->album['id'];
} else {
A::NotFound();
}
break;
} else {
if ($this->category = A::$DB->getRow("\r\r\n\t SELECT * FROM " . SECTION . "_categories WHERE idker={$this->idcat} AND urlname='{$param}' AND active='Y'")) {
$this->idcat = $this->category['id'];
} else {
A::NotFound();
}
}
}
if ($this->idalb > 0) {
$this->page = "album";
} elseif ($this->idcat > 0) {
$this->page = "category";
} else {
$this->page = "main";
}
}
示例2: Router
/**
* Маршрутизатор URL.
*
* @param array $uri Элементы полного пути URL.
*/
function Router($uri)
{
if (count($uri) == 0) {
$this->page = "result";
} else {
A::NotFound();
}
}
示例3: Router
/**
* Маршрутизатор URL.
*
* @param array $uri Элементы полного пути URL.
*/
function Router($uri)
{
if (count($uri) == 1) {
if (reset($uri) == "message.html") {
$this->page = "message";
} else {
A::NotFound();
}
} elseif (count($uri) == 0) {
$this->page = "main";
} else {
A::NotFound();
}
}
示例4: Router
/**
* Маршрутизатор URL.
*/
function Router($uri)
{
if (count($uri) == 1) {
if (preg_match("/^([0-9]{2})-([0-9]{2})-([0-9]{4})\\.html\$/", reset($uri), $match)) {
$this->day = $match[1];
$this->month = $match[2];
$this->year = $match[3];
$this->page = "archive";
} else {
A::NotFound();
}
} elseif (count($uri) == 0) {
$this->page = "archive";
} else {
A::NotFound();
}
}
示例5: Router
/**
* Маршрутизатор URL.
*
* @param array $uri Элементы полного пути URL.
*/
function Router($uri)
{
foreach ($uri as $param) {
if (preg_match("/^(.+)\\.html\$/", $param, $match)) {
if ($this->pagedata = A::$DB->getRow("SELECT * FROM " . SECTION . " WHERE idker={$this->id} AND type='page' AND urlname='{$match[1]}' AND active='Y'")) {
$this->id = $id = $this->pagedata['id'];
$this->idker = $this->pagedata['idker'];
} else {
A::NotFound();
}
} else {
if ($this->pagedata = A::$DB->getRow("SELECT * FROM " . SECTION . " WHERE idker={$this->id} AND type='dir' AND urlname='{$param}' AND active='Y'")) {
$this->id = $this->pagedata['id'];
$this->idker = $this->pagedata['id'];
$this->fullpath[] = $param;
} else {
A::NotFound();
}
}
}
$idker = $this->id;
if (!isset($id)) {
if ($this->pagedata = A::$DB->getRow("SELECT * FROM " . SECTION . " WHERE idker={$idker} AND type='page' AND urlname='index' AND active='Y'")) {
$this->id = $id = $this->pagedata['id'];
}
}
if (!isset($id)) {
if ($this->pagedata = A::$DB->getRow("SELECT * FROM " . SECTION . " WHERE idker={$idker} AND type='page' AND active='Y' ORDER BY sort LIMIT 0,1")) {
$this->id = $this->pagedata['id'];
}
}
if (!$this->id || empty($this->pagedata)) {
A::NotFound();
}
$this->template = $this->pagedata['template'];
}
示例6: Router
/**
* Маршрутизатор URL.
*
* @param array $uri Элементы полного пути URL.
*/
function Router($uri)
{
foreach ($uri as $param) {
if (preg_match("/^([^.]+)\\.html\$/", $param, $match)) {
if ($this->idcat == 0) {
switch ($match[1]) {
case "basket":
$this->page = "basket";
return;
case "order":
$this->page = "order";
return;
case "message":
$this->page = "message";
return;
case "price":
$this->page = "price";
return;
case "compare":
$this->page = "compare";
return;
case "myorders":
$this->page = "myorders";
return;
case "favorites":
$_GET['favorite'] = 1;
$this->page = "result";
return;
case "news":
$_GET['new'] = 1;
$this->page = "result";
return;
}
}
if ($match[1] == 'result') {
$this->page = "result";
return;
}
if ($this->itemdata = A::$DB->getRow("SELECT * FROM " . SECTION . "_catalog WHERE idcat={$this->idcat} AND urlname='{$match[1]}' AND active='Y'")) {
$this->iditem = $this->itemdata['id'];
} else {
A::NotFound();
}
break;
} else {
if ($this->category = A::$DB->getRow("SELECT * FROM " . SECTION . "_categories WHERE idker={$this->idcat} AND urlname='{$param}' AND active='Y'")) {
$this->idcat = $this->category['id'];
} else {
A::NotFound();
}
}
}
if ($this->iditem > 0) {
$this->page = "page";
} elseif ($this->idcat > 0) {
$this->page = "category";
} else {
$this->page = "main";
}
}
示例7: seo_CreateAdminFrame
A::$MAINFRAME->Assign('keywords', $row['keywords']);
}
if ($row['description']) {
A::$MAINFRAME->Assign('description', $row['description']);
}
}
}
}
}
A::$OBSERVER->AddHandler('ShowPage', 'seo_ShowPage');
function seo_CreateAdminFrame($item)
{
if ((MODE == 'site' || MODE == 'sections') && ($structure = getStructureByPlugin('seo'))) {
A::$MAINFRAME->AddJScript("/plugins/seo/admin/seo.js");
A::$MAINFRAME->AddJVar("SEOSTRUCTURE", $structure);
A::$MAINFRAME->Assign("seo", $structure);
}
}
A::$OBSERVER->AddHandler('CreateAdminFrame', 'seo_CreateAdminFrame');
if (A_MODE == A_MODE_FRONT && ($structure = getStructureByPlugin('seo'))) {
if ($urls = A::$DB->getAssoc("SELECT url,move,notfound FROM {$structure} WHERE move<>'' OR notfound='Y'")) {
$PURL = parse_url(urldecode(getenv('REQUEST_URI')));
if (isset($urls[$PURL['path']])) {
if ($urls[$PURL['path']]['notfound'] == 'Y') {
A::NotFound();
} elseif ($urls[$PURL['path']]['move']) {
A::goUrl($urls[$PURL['path']]['move'], null, true);
}
}
}
}