• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP whichApplication函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __construct

 public function __construct()
 {
     $this->Files = $this->core("Files");
     $this->Applications_Model = $this->model("Applications_Model");
     $this->helper(array("alerts", "html", "forms", "router"));
     $this->application = $this->Applications_Model->getID(whichApplication());
 }
开发者ID:no2key,项目名称:MuuCMS,代码行数:7,代码来源:library.php


示例2: getApplicationID

 public function getApplicationID($application = NULL)
 {
     if (is_null($application)) {
         $application = whichApplication();
     }
     return $this->Applications_Model->getID($application);
 }
开发者ID:no2key,项目名称:MuuCMS,代码行数:7,代码来源:cpanel.php


示例3: __construct

 public function __construct()
 {
     $this->Db = $this->db();
     $this->helpers();
     $this->table = "videos";
     $this->language = whichLanguage();
     $this->application = whichApplication();
     $this->YouTube = $this->library("youtube", "Youtube", NULL, "videos");
     $this->Data = $this->core("Data");
 }
开发者ID:no2key,项目名称:MuuCMS,代码行数:10,代码来源:videos.php


示例4: __construct

 public function __construct()
 {
     $this->app("cpanel");
     $this->application = whichApplication();
     $this->CPanel = $this->classes("CPanel", "cpanel");
     $this->isAdmin = $this->CPanel->load();
     $this->vars = $this->CPanel->notifications();
     $this->CPanel_Model = $this->model("CPanel_Model");
     $this->Templates = $this->core("Templates");
     $this->Templates->theme("cpanel");
 }
开发者ID:no2key,项目名称:MuuCMS,代码行数:11,代码来源:cpanel.php


示例5: __construct

 public function __construct()
 {
     $this->app("cpanel");
     $this->application = whichApplication();
     $this->CPanel = $this->classes("CPanel", "cpanel");
     $this->isAdmin = $this->CPanel->load();
     $this->vars = $this->CPanel->notifications();
     $this->helper("applications", "applications");
     $this->CPanel_Model = $this->model("CPanel_Model");
     $this->Categories_Model = $this->model("Categories_Model");
     $this->Templates = $this->core("Templates");
     $this->Templates->theme("cpanel");
     $this->Model = ucfirst($this->application) . "_Model";
     $this->{"{$this->Model}"} = $this->model($this->Model);
 }
开发者ID:no2key,项目名称:MuuCMS,代码行数:15,代码来源:cpanel.php


示例6: routePath

function routePath()
{
    $flag = FALSE;
    $rsaquo = " ›› ";
    $path = path(whichApplication());
    if (segments() > 0) {
        for ($i = 0; $i <= segments() - 1; $i++) {
            if (!$flag) {
                if (segments() === 6) {
                    $flag = TRUE;
                    $HTML = a(__(_("Home")), PATH("cpanel")) . $rsaquo;
                    $HTML .= a(__(_(ucfirst(segment(2)))), $path . segment(2)) . $rsaquo;
                    $HTML .= a(__(_(ucfirst(segment(3)))), $path . segment(2) . _sh . segment(3)) . $rsaquo;
                    $HTML .= a(__(_(ucfirst(segment(4)))), $path . segment(2) . _sh . segment(3) . _sh . segment(4)) . $rsaquo;
                    $HTML .= a(__(_(ucfirst(segment(5)))), $path . segment(2) . _sh . segment(3) . _sh . segment(4) . _sh . segment(5));
                } elseif (segments() === 5) {
                    $flag = TRUE;
                    $HTML = a(__(_("Home"), path("cpanel"))) . $rsaquo;
                    $HTML .= a(__(_(ucfirst(segment(2)))), $path . segment(2)) . $rsaquo;
                    $HTML .= a(__(_(ucfirst(segment(3)))), $path . segment(2) . _sh . segment(3)) . $rsaquo;
                    $HTML .= a(__(_(ucfirst(segment(4)))), $path . segment(2) . _sh . segment(3) . _sh . segment(4));
                } elseif (segments() === 4) {
                    $flag = TRUE;
                    $HTML = a(__(_("Home")), path("cpanel")) . $rsaquo;
                    $HTML .= a(__(_(ucfirst(segment(1)))), $path . "cpanel") . $rsaquo;
                    $HTML .= a(__(_(ucfirst(segment(3)))), $path . segment(2) . _sh . segment(3));
                } elseif (segments() === 3) {
                    $flag = TRUE;
                    $HTML = a(__(_("Home")), path("cpanel")) . $rsaquo;
                    $HTML .= a(__(_(ucfirst(segment(1)))), $path . segment(3));
                } elseif (segments() === 2) {
                    $flag = TRUE;
                    $HTML = a(__(_("Home")), path("cpanel"));
                } else {
                    $HTML = a(__(_("Home")), path("cpanel"));
                }
            }
        }
    }
    return $HTML;
}
开发者ID:no2key,项目名称:MuuCMS,代码行数:41,代码来源:routes.php


示例7: view

 /**
  * Loads a view
  *
  * @param string $name
  * @param string $application = NULL
  * @param string $vars        = NULL
  * @return string value / void
  */
 public function view($name, $vars = NULL, $application = NULL, $return = FALSE)
 {
     if (is_null($application)) {
         $application = whichApplication();
     }
     if (!is_null($application)) {
         $view = "www/applications/{$application}/views/{$name}.php";
         if (is_array($vars)) {
             $key = array_keys($vars);
             $size = sizeof($key);
             for ($i = 0; $i < $size; $i++) {
                 ${$key}[$i] = $vars[$key[$i]];
             }
         } elseif ($vars) {
             return $view;
         }
         if (file_exists($view)) {
             include $view;
             if ($return) {
                 $output = ob_get_contents();
                 ob_end_clean();
                 return $output;
             }
         } else {
             getException("Error 404: {$view} view not found");
         }
     } else {
         return FALSE;
     }
 }
开发者ID:no2key,项目名称:MuuCMS,代码行数:38,代码来源:load.php


示例8: total

 public function total($trash = FALSE, $singular = "record", $plural = "records", $comments = FALSE)
 {
     $primaryKey = $this->Db->table($this->application);
     if (POST("seek")) {
         if (POST("field") === "ID") {
             if (SESSION("ZanUserPrivilegeID") === 1) {
                 $total = $this->Db->countBySQL("{$primaryKey} = '" . POST("search") . "'", $this->application);
             } else {
                 $total = $this->Db->countBySQL("ID_User = '" . SESSION("ZanUserID") . "' AND {$primaryKey} = '" . POST("search") . "'", $this->application);
             }
         } else {
             if (SESSION("ZanUserPrivilegeID") === 1) {
                 $total = $this->Db->countBySQL("" . POST("field") . " LIKE '%" . POST("search") . "%'", $this->application);
             } else {
                 $total = $this->Db->countBySQL("ID_User = '" . SESSION("ZanUserID") . "' AND " . POST("field") . " LIKE '%" . POST("search") . "%'", $this->application);
             }
         }
         if ($total === 0) {
             $total = "0 " . __(_("Records founded"));
         } elseif ($total === 1) {
             $total = "1 " . __(_("Record found"));
         } else {
             $total = $total . " " . __(_("Records founded"));
         }
         return $total;
     } elseif (!$trash) {
         if (SESSION("ZanUserPrivilegeID") === 1) {
             $total = $this->Db->countBySQL("Situation != 'Deleted'", $this->application);
         } else {
             $total = $this->Db->countBySQL("ID_User = '" . SESSION("ZanUserID") . "' AND Situation != 'Deleted'", $this->application);
         }
     } else {
         if (SESSION("ZanUserPrivilegeID") === 1) {
             $total = $this->Db->countBySQL("Situation = 'Deleted'", $this->application);
         } else {
             $total = $this->Db->countBySQL("ID_User = '" . SESSION("ZanUserID") . "' AND Situation = 'Deleted'", $this->application);
         }
     }
     if ($comments) {
         if (whichApplication() === "blog") {
             $total = $this->Db->countBySQL("ID_Application = '3'", "comments");
         }
     }
     if ($total === 0) {
         $total = "0 " . __(_($plural));
     } elseif ((int) $total === 1) {
         $total = "1 " . __(_($singular));
     } else {
         $total = $total . " " . __(_($plural));
     }
     return $total;
 }
开发者ID:no2key,项目名称:MuuCMS,代码行数:52,代码来源:cpanel.php


示例9: isset

}
$ID = isset($data) ? recoverPOST("ID", $data[0]["ID_Ad"]) : 0;
$title = isset($data) ? recoverPOST("title", $data[0]["Title"]) : recoverPOST("title");
$banner = isset($data) ? recoverPOST("banner", $data[0]["Banner"]) : NULL;
$URL = isset($data) ? recoverPOST("URL", $data[0]["URL"]) : "http://";
$position = isset($data) ? recoverPOST("position", $data[0]["Position"]) : recoverPOST("position");
$code = isset($data) ? recoverPOST("code", $data[0]["Code"]) : recoverPOST("code");
$time = isset($data) ? recoverPOST("time", $data[0]["Time"]) : recoverPOST("time");
$situation = isset($data) ? recoverPOST("situation", $data[0]["Situation"]) : recoverPOST("situation");
$principal = isset($data) ? recoverPOST("principal", $data[0]["Principal"]) : recoverPOST("principal");
$edit = isset($data) ? TRUE : FALSE;
$action = isset($data) ? "edit" : "save";
$href = isset($data) ? path(whichApplication() . "cpanel/{$action}/{$ID}/") : path(whichApplication() . "cpanel/add/");
print div("add-form", "class");
print formOpen($href, "form-add", "form-add");
print p(__(_(ucfirst(whichApplication()))), "resalt");
print isset($alert) ? $alert : NULL;
print formInput(array("name" => "title", "class" => "span10 required", "field" => __(_("Title")), "p" => TRUE, "value" => $title));
if (isset($banner)) {
    print __(_("If you change the banner image, this image will be deleted")) . "<br />";
    print img(path($banner, TRUE), array("alt" => "Banner", "class" => "no-border", "style" => "max-width: 780px;"));
    print formInput(array("name" => "banner", "type" => "hidden", "value" => $banner));
}
print formInput(array("type" => "file", "name" => "image", "class" => "required", "field" => __(_("Image")), "p" => TRUE));
$options = array(0 => array("value" => "Top", "option" => __(_("Top")) . " (960x100px)", "selected" => $position === "Top" ? TRUE : FALSE), 1 => array("value" => "Left", "option" => __(_("Left")) . " (120x600px, 250x250px)", "selected" => $position === "Left" ? TRUE : FALSE), 2 => array("value" => "Right", "option" => __(_("Right")) . " (120x600px, 250x250px)", "selected" => $position === "Right" ? TRUE : FALSE), 3 => array("value" => "Bottom", "option" => __(_("Bottom")) . " (960x100px)", "selected" => $position === "Bottom" ? TRUE : FALSE), 4 => array("value" => "Center", "option" => __(_("Center")) . " (600x100px)", "selected" => $position === "Center" ? TRUE : FALSE));
print formSelect(array("name" => "position", "class" => "required", "p" => TRUE, "field" => __(_("Position"))), $options);
print formInput(array("name" => "URL", "class" => "span10 required", "field" => __(_("URL")), "p" => TRUE, "value" => $URL));
print formTextarea(array("name" => "code", "class" => "span10 required", "style" => "height: 150px;", "field" => __(_("Code")), "p" => TRUE, "value" => $code));
$options = array(0 => array("value" => 1, "option" => __(_("Yes")), "selected" => (int) $principal === 1 ? TRUE : FALSE), 1 => array("value" => 0, "option" => __(_("No")), "selected" => (int) $principal === 0 ? TRUE : FALSE));
print formSelect(array("name" => "principal", "class" => "required", "p" => TRUE, "field" => __(_("Principal"))), $options);
$options = array(0 => array("value" => "Active", "option" => __(_("Active")), "selected" => $situation === "Active" ? TRUE : FALSE), 1 => array("value" => "Inactive", "option" => __(_("Inactive")), "selected" => $situation === "Inactive" ? TRUE : FALSE));
开发者ID:no2key,项目名称:MuuCMS,代码行数:31,代码来源:add.php


示例10: isAllow

 public function isAllow($permission = "view", $application = NULL)
 {
     if (SESSION("ZanUserPrivilegeID") and !SESSION("ZanUserApplication")) {
         $this->Applications_Model = $this->model("Applications_Model");
         if (is_null($application)) {
             $application = whichApplication();
         }
         $privilegeID = SESSION("ZanUserPrivilegeID");
         $applicationID = $this->Applications_Model->getID($application);
         if ($this->getPermissions($privilegeID, $applicationID, $permission)) {
             return TRUE;
         } else {
             return FALSE;
         }
     } else {
         return TRUE;
     }
 }
开发者ID:no2key,项目名称:MuuCMS,代码行数:18,代码来源:users.php


示例11: getScript


//.........这里部分代码省略.........
										theme_advanced_toolbar_align : "left",
										theme_advanced_statusbar_location : "bottom",
										theme_advanced_resizing : false,
										convert_urls : false,                    
										content_CSS : "css/content.css",               
										external_link_list_url : "lists/link_list.js",
										external_image_list_url : "lists/image_list.js",
										media_external_list_url : "lists/media_list.js"
									});
							';
                } else {
                    $HTML .= '		
									tinyMCE.init({
										mode : "exact",
										elements : "editor",
										theme : "simple",
										editor_selector : "mceSimple"
									});
							';
                }
                $HTML .= '	function insertHTML(content) {
								parent.tinyMCE.execCommand(\'mceInsertContent\', false, content);
							}
						</script>';
            } elseif ($js === "upload") {
                $iPx = POST("iPx") ? POST("iPx") : 'i';
                $iPath = POST("iPath") ? POST("iPath") : 'www/lib/files/images/uploaded/';
                $iPath = POST($iPx . "Dirbase") ? POST($iPx . "Dirbase") : $iPath;
                $iPath = POST($iPx . "Make") ? POST($iPx . "Dir") . slug(POST($iPx . "Dirname")) . _sh : $iPath;
                $dPx = POST("dPx") ? POST("dPx") : "d";
                $dPath = POST("dPath") ? POST("dPath") : "www/lib/files/documents/uploaded/";
                $dPath = POST($dPx . "Dirbase") ? POST($dPx . "Dirbase") : $dPath;
                $dPath = POST($dPx . "Make") ? POST($dPx . "Dir") . nice(POST($dPx . "Dirname")) . _sh : $dPath;
                $application = whichApplication();
                ?>
						<script type="text/javascript">
							$(document).on("ready", function() {
								function uploadResponse(state, file) {
									var path, insert, ok, error, form, message; 
									
									path = '<?php 
                print path($iPath, TRUE);
                ?>
' + file;

									HTML = '\'<img src=\\\'' + path + '\\\' alt=\\\'' + file + '\\\' />\'';
									
									insert = '<li><input name="iLibrary[]" type="checkbox" value="' + path + '" /> <span class="small">00<' + '/span>';
									insert = insert + '<a href="' + path + '" rel="external" title="<?php 
                print __(_("Preview"));
                ?>
"><span class="tiny-image tiny-search">&nbsp;&nbsp;&nbsp;&nbsp;</span><' + '/a>';
									insert = insert + '<a class="pointer" onclick="javascript:insertHTML(' + HTML + ');" title="<?php 
                print __(_("Insert image"));
                ?>
"><span class="tiny-image tiny-add">&nbsp;&nbsp;&nbsp;&nbsp;</span>&nbsp;';
									insert = insert + '<span class="bold">' + file + '<' + '/span><' + '/a><' + '/li>';						
									
									if(state == 1) {
										message = '<?php 
                print __(_("The file size exceed the permitted limit"));
                ?>
';
									}
									
									if(state == 2) {
开发者ID:no2key,项目名称:MuuCMS,代码行数:67,代码来源:scripts.php


示例12: __

?>

<div class="add-form">
	<form id="form-add" class="form-add" action="<?php 
print $href;
?>
" method="post" enctype="multipart/form-data">
		<fieldset>
			<legend><?php 
print __(_("Add Video"));
?>
</legend>
			
			<p class="resalt">
				<?php 
print __(_(ucfirst(whichApplication())));
?>
			</p>
			
			<?php 
print isset($alert) ? $alert : NULL;
?>
			
			<?php 
if ($action == "save") {
    ?>
				<p class="field">
					&raquo; <?php 
    print __(_("URL"));
    ?>
  <?php 
开发者ID:no2key,项目名称:MuuCMS,代码行数:31,代码来源:add.php


示例13: getSearch

function getSearch()
{
    global $Load;
    $Load->helper(array("forms", "html"));
    $application = whichApplication();
    if ($application === "users") {
        $field = "username";
        $name = __(_("Username"));
    } else {
        $field = "title";
        $name = __(_("Title"));
    }
    $fields = array(0 => array("field" => "ID", "name" => "ID", "selected" => FALSE), 1 => array("field" => $field, "name" => $name, "selected" => TRUE));
    $trash = NULL;
    if (segment(3, isLang()) === "trash") {
        $trash = "trash";
    }
    $HTML = formOpen(path($application . "/cpanel/results/{$trash}"), "form-results-search");
    $HTML .= br();
    $HTML .= bold("&nbsp" . __(_("Search")) . ":", FALSE);
    $attributes = array("p" => FALSE, "name" => "search", "class" => "span 1 required");
    $HTML .= formInput($attributes);
    $HTML .= bold(" " . __(_("Field")) . ":", FALSE);
    $i = 0;
    foreach ($fields as $field) {
        $fields[$i]["value"] = $field["field"];
        $fields[$i]["option"] = $field["name"];
        $fields[$i]["selected"] = $field["selected"];
        $i++;
    }
    $HTML .= formSelect(array("name" => "field", "class" => "span2 required"), $fields);
    $HTML .= bold(__(_("Order")) . ":", FALSE);
    $options[0]["value"] = "ASC";
    $options[0]["option"] = __(_("Ascending"));
    $options[0]["selected"] = TRUE;
    $options[1]["value"] = "DESC";
    $options[1]["option"] = __(_("Descending"));
    $options[1]["selected"] = FALSE;
    $HTML .= formSelect(array("name" => "order", "class" => "span2 required"), $options);
    $HTML .= formInput(array("name" => "seek", "type" => "submit", "class" => "btn btn-info", "value" => __(_("Seek"))));
    return $HTML;
}
开发者ID:no2key,项目名称:MuuCMS,代码行数:42,代码来源:cpanel.php


示例14: path

?>
		
<?php 
if ($data) {
    $ID = $data[0]["ID_Feedback"];
    $name = $data[0]["Name"];
    $email = $data[0]["Email"];
    $company = $data[0]["Company"];
    $phone = $data[0]["Phone"];
    $subject = $data[0]["Subject"];
    $message = $data[0]["Message"];
    $date = $data[0]["Text_Date"];
    $state = $data[0]["Situation"];
    $back = path(whichApplication() . _sh . "cpanel" . _sh . "results");
} else {
    redirect(path(whichApplication() . _sh . "cpanel" . _sh . "results"));
}
?>

<div class="add-form">
	<p class="field">
		<strong><?php 
print __(_("Name"));
?>
</strong><br />
		<?php 
print $name;
?>
	</p>
	
	<p class="field">
开发者ID:no2key,项目名称:MuuCMS,代码行数:31,代码来源:read.php


示例15: die

    die("Error: You don't have permission to access here...");
}
$ID = isset($data) ? recoverPOST("ID", $data[0]["ID_Post"]) : 0;
$ID_URL = isset($data) ? recoverPOST("ID_URL", $data[0]["ID_URL"]) : recoverPOST("ID_URL");
$title = isset($data) ? recoverPOST("title", $data[0]["Title"]) : recoverPOST("title");
$content = isset($data) ? recoverPOST("content", $data[0]["Content"]) : recoverPOST("content");
$situation = isset($data) ? recoverPOST("situation", $data[0]["Situation"]) : recoverPOST("situation");
$language = isset($data) ? recoverPOST("language", $data[0]["Language"]) : recoverPOST("language");
$pwd = isset($data) ? recoverPOST("pwd", $data[0]["Pwd"]) : recoverPOST("pwd");
$edit = isset($data) ? TRUE : FALSE;
$action = isset($data) ? "edit" : "save";
$href = isset($data) ? path(whichApplication() . "/cpanel/{$action}/{$ID}/") : path(whichApplication() . "/cpanel/add");
print div("add-form", "class");
print formOpen($href, "form-add", "multimedia");
print p(__(_(ucfirst(whichApplication()))), "resalt");
print isset($alert) ? $alert : NULL;
print formInput(array("type" => "file", "id" => "fileselect", "name" => "fileselect[]", "multiple" => "multiple", "class" => "required", "field" => __(_("Upload files")), "p" => TRUE));
print div("filedrag");
print __(_("Drag & drop your files here"));
print div(FALSE);
print div("progress") . div(FALSE);
print div("response") . div(FALSE);
print '<div class="clear"></div>';
if ($uploaded) {
    print formSave($action);
}
print formInput(array("name" => "upload", "type" => "hidden", "value" => path(whichApplication() . "/cpanel/upload"), "id" => "upload"));
print formInput(array("name" => "MAX_FILE_SIZE", "type" => "hidden", "value" => "MAX_FILE_SIZE", "id" => "upload"));
print formInput(array("name" => "ID", "type" => "hidden", "value" => $ID, "id" => "ID_Post"));
print formClose();
print div(FALSE);
开发者ID:no2key,项目名称:MuuCMS,代码行数:31,代码来源:add.php


示例16: view

 public function view($name, $vars = null, $application = null, $return = false)
 {
     if (is_null($application)) {
         $application = whichApplication();
     }
     if (!is_null($application) and is_string($application) and is_string($name)) {
         $theme = _get("webTheme");
         if (file_exists("www/lib/themes/{$theme}/views/{$application}/{$name}.php")) {
             $view = "www/lib/themes/{$theme}/views/{$application}/{$name}.php";
             $minView = "www/lib/themes/{$theme}/views/{$application}/min/{$name}.php";
         } else {
             $view = "www/applications/{$application}/views/{$name}.php";
             $minView = "www/applications/{$application}/views/min/{$name}.php";
         }
         if (_get("environment") > 2 and file_exists($minView)) {
             $view = $minView;
         }
         if (is_array($vars)) {
             $key = array_keys($vars);
             $size = sizeof($key);
             for ($i = 0; $i < $size; $i++) {
                 ${$key}[$i] = $vars[$key[$i]];
             }
         } elseif ($vars) {
             return $view;
         }
         if (file_exists($view)) {
             ob_start();
             include $view;
             if ($return) {
                 $output = ob_get_contents();
                 ob_clean();
                 return $output;
             }
         } else {
             getException("Error 404: {$view} view not found");
         }
     } else {
         return false;
     }
 }
开发者ID:jgianpiere,项目名称:ZanPHP,代码行数:41,代码来源:load.php


示例17: __construct

 public function __construct()
 {
     $this->application = whichApplication();
     $this->Videos_Model = $this->model("Videos_Model");
 }
开发者ID:no2key,项目名称:MuuCMS,代码行数:5,代码来源:ajax.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP whoami函数代码示例发布时间:2022-05-23
下一篇:
PHP which函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap