本文整理汇总了PHP中common::GetCommand方法的典型用法代码示例。如果您正苦于以下问题:PHP common::GetCommand方法的具体用法?PHP common::GetCommand怎么用?PHP common::GetCommand使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common
的用法示例。
在下文中一共展示了common::GetCommand方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ShowPost
function ShowPost()
{
$cmd = common::GetCommand();
switch ($cmd) {
// inline editing
case 'inlineedit':
$this->InlineEdit();
die;
case 'save_inline':
case 'save':
$this->SaveInline();
break;
//close comments
//close comments
case 'closecomments':
$this->ToggleComments(true, $this->post_id);
break;
case 'opencomments':
$this->ToggleComments(false, $this->post_id);
break;
//commments
//commments
case 'delete_comment':
$this->DeleteComment();
break;
}
parent::ShowPost();
}
示例2: MultiLang_Admin
function MultiLang_Admin()
{
global $page;
$this->Init();
$cmd = common::GetCommand();
switch ($cmd) {
case 'title_settings_add':
case 'title_settings_save':
$this->TitleSettingsSave($cmd);
$this->TitleSettings();
return;
case 'title_settings':
$this->TitleSettings();
return;
case 'rmtitle':
$this->RemoveTitle();
$this->TitleSettings();
return;
case 'not_translated':
$this->NotTranslated();
break;
case 'save_languages':
$this->SaveLanguages();
case 'languages':
$this->SelectLanguages();
break;
default:
$this->ShowStats();
break;
}
}
示例3: admin_extra
function admin_extra()
{
global $langmessage, $dataDir;
$this->folder = $dataDir . '/data/_extra';
$this->areas = gpFiles::ReadDir($this->folder);
asort($this->areas);
$cmd = common::GetCommand();
$show = true;
switch ($cmd) {
case 'delete':
$this->DeleteArea();
break;
case 'save':
if ($this->SaveExtra()) {
break;
}
case 'edit':
if ($this->EditExtra()) {
$show = false;
}
break;
case 'rawcontent':
$this->RawContent();
break;
case 'inlineedit':
$this->InlineEdit();
die;
}
if ($show) {
$this->ShowExtras();
}
}
示例4: __construct
function __construct()
{
global $langmessage;
$this->Init();
gp_edit::PrepAutoComplete();
$cmd = common::GetCommand();
$show = true;
switch ($cmd) {
case 'save404':
$show = $this->Save404();
break;
case 'edit404':
$this->Edit404();
return;
case 'editredir':
$this->EditRedir();
return;
case 'saveredir':
$this->SaveRedir();
break;
case 'updateredir':
$this->UpdateRedir();
break;
case 'rmredir':
$this->RmRedir();
break;
case 'newform':
$this->RedirForm();
return;
}
if ($show) {
$this->Show();
}
}
示例5: Example_Ajax
function Example_Ajax()
{
global $page, $addonRelativeCode;
//prepare the page
$page->head_js[] = $addonRelativeCode . 'static/02_script.js';
$page->admin_js = true;
//get request parameters and execute any commands
$string = '';
if (isset($_REQUEST['string'])) {
$string = $_REQUEST['string'];
}
$cmd = common::GetCommand();
switch ($cmd) {
case 'randomstring':
$string = common::RandomString(10);
break;
}
//display the form
echo '<h2>Example Ajax Requests</h2>';
echo '<form method="post" action="' . $page->title . '">';
echo 'Text: <input type="text" name="string" value="' . htmlspecialchars($string) . '" size="30" />';
echo ' <input type="submit" class="gpajax" value="Post Form Asynchronosly" /> ';
echo common::Link($page->title, 'Get Random String', 'cmd=randomstring', 'name="gpajax"');
echo '</form>';
//output the $_REQUEST variable
echo '<h3>Request</h3>';
echo showArray($_REQUEST);
//plugin example navigation
gpPlugin::incl('navigation.php');
PluginExampleNavigation();
}
示例6: admin_missing
function admin_missing()
{
global $langmessage;
$this->Init();
$cmd = common::GetCommand();
$show = true;
switch ($cmd) {
case 'save404':
$show = $this->Save404();
break;
case 'edit404':
$this->Edit404();
return;
case 'saveredir':
$this->SaveRedir();
break;
case 'updateredir':
$this->UpdateRedir();
break;
case 'rmredir':
$this->RmRedir();
break;
}
if ($show) {
$this->Show();
}
}
示例7: __construct
function __construct()
{
global $langmessage, $page;
$page->head_js[] = '/include/js/admin/trash.js';
$this->trash_files = admin_trash::TrashFiles();
$cmd = common::GetCommand();
switch ($cmd) {
case 'RestoreDeleted':
$this->RestoreDeleted();
break;
case 'DeleteFromTrash':
$this->DeleteFromTrash();
break;
}
//view a trash file
if (strpos($page->requested, '/') !== false) {
$parts = explode('/', $page->requested, 2);
$title = $parts[1];
if (isset($this->trash_files[$title])) {
$this->ViewTrashFile($title);
return;
}
}
//view all trash files
$this->Trash();
}
示例8: __construct
public function __construct()
{
global $page, $langmessage, $addonFolderName;
SimpleBlogCommon::Init();
//get the post id
if ($page->pagetype == 'special_display') {
$this->post_id = $this->PostID($page->requested);
}
if (common::LoggedIn()) {
$page->admin_links[] = array('Special_Blog', 'Blog Home');
$page->admin_links[] = array('Admin_Blog', 'New Blog Post', 'cmd=new_form');
$page->admin_links[] = array('Admin_Blog', 'Configuration');
$page->admin_links[] = array('Admin_Theme_Content', $langmessage['editable_text'], 'cmd=addontext&addon=' . urlencode($addonFolderName), ' name="gpabox" ');
$label = 'Number of Posts: ' . SimpleBlogCommon::$data['post_count'];
$page->admin_links[$label] = '';
$cmd = common::GetCommand();
switch ($cmd) {
//delete
case 'deleteentry':
case 'delete':
SimpleBlogCommon::Delete();
break;
}
}
if ($this->post_id) {
$this->ShowPost();
return;
}
$this->ShowPage();
if (common::LoggedIn() && !file_exists(self::$index_file)) {
echo '<p>Congratulations on successfully installing Simple Blog for gpEasy.</p> ';
echo '<p>You\'ll probably want to get started by ' . common::Link('Admin_Blog', 'creating a blog post', 'cmd=new_form') . '.</p>';
}
}
示例9: GetGpxContent
function GetGpxContent()
{
$this->head .= "\n<script type=\"text/javascript\">var IE_LT_8 = false;</script><!--[if lt IE 8]>\n<script type=\"text/javascript\">IE_LT_8=true;</script>\n<![endif]-->";
$this->head_js[] = '/include/js/login.js';
$this->head_js[] = '/include/js/md5_sha.js';
$this->head_js[] = '/include/thirdparty/js/jsSHA.js';
$this->css_admin[] = '/include/css/login.css';
$_POST += array('username' => '');
$this->admin_js = true;
includeFile('tool/sessions.php');
gpsession::cookie('g', 2);
$this->BrowserWarning();
$this->JavascriptWarning();
echo '<div class="req_script nodisplay" id="login_container">';
echo '<table><tr><td>';
$cmd = common::GetCommand();
switch ($cmd) {
case 'send_password':
if ($this->SendPassword()) {
$this->LoginForm();
} else {
$this->FogottenPassword();
}
break;
case 'forgotten':
$this->FogottenPassword();
break;
default:
$this->LoginForm();
break;
}
echo '</td></tr></table>';
echo '</div>';
}
示例10: __construct
function __construct()
{
global $page, $langmessage, $config, $contact_message_sent, $message_send_attempt;
$this->sent = $contact_message_sent;
if (empty($config['toemail'])) {
if (common::LoggedIn()) {
$url = common::GetUrl('Admin_Configuration');
msg($langmessage['enable_contact'], $url);
}
echo $langmessage['not_enabled'];
return;
}
$cmd = common::GetCommand();
switch ($cmd) {
case 'gp_send_message':
if (!$message_send_attempt) {
$message_send_attempt = true;
if (!$this->sent && $this->SendMessage()) {
$this->sent = $contact_message_sent = true;
break;
}
}
default:
break;
}
$this->ShowForm();
}
示例11: Run
function Run()
{
if (!$this->CheckPHP()) {
echo $this->output_phpcheck;
return;
}
$cmd = common::GetCommand();
$show = true;
switch ($cmd) {
case 'checkremote':
$this->DoRemoteCheck(true);
break;
case 'update':
if (gp_remote_update && $this->Update()) {
$show = false;
}
break;
}
if ($show) {
$this->ShowStatus();
echo '<h2>Status</h2>';
$this->CheckStatus();
echo $this->output_phpcheck;
}
}
示例12: RunScript
public function RunScript()
{
global $langmessage;
$cmd = common::GetCommand();
switch ($cmd) {
case 'do_export':
$this->DoExport();
$this->SetExported();
break;
case 'delete':
$this->DeleteConfirmed();
$this->SetExported();
break;
case 'revert_confirmed':
case 'revert':
if ($this->Revert($cmd)) {
return;
}
break;
case 'revert_clean':
$this->RevertClean();
break;
}
//echo '<h2>'.$langmessage['Import/Export'].'</h2>';
echo '<h2>' . $langmessage['Export'] . '</h2>';
echo $langmessage['Export About'];
echo $this->iframe;
$this->ExportForm();
echo '<br/>';
$this->Exported();
}
示例13: Run
function Run()
{
echo '<div class="easy_comments_wrap">';
echo '<h2>Comments</h2>';
if (!$this->current_index) {
echo '<p>Comments are not available for this page</p>';
echo '</div>';
return;
}
$cmd = common::GetCommand();
$show = true;
$comment_added = false;
switch ($cmd) {
//delete prompts
case 'easy_comment_add':
$comment_added = $this->CommentAdd();
break;
case 'easy_comment_rm':
$this->CommentRm($cmd);
break;
}
$this->ShowComments();
if (!$comment_added) {
$this->CommentForm();
}
echo '</div>';
}
示例14: admin_port
function admin_port()
{
global $langmessage, $dataDir, $page;
$this->export_dir = $dataDir . '/data/_exports';
$this->temp_dir = $dataDir . '/data/_temp';
$this->export_ini_file = $dataDir . '/data/_temp/Export.ini';
$this->Init();
$this->SetExported();
$cmd = common::GetCommand();
switch ($cmd) {
case 'do_export':
$this->DoExport();
$this->SetExported();
break;
case 'delete':
$this->DeleteConfirmed();
$this->SetExported();
break;
case 'revert_confirmed':
case 'revert':
if ($this->Revert($cmd)) {
return;
}
break;
case 'revert_clean':
$this->RevertClean();
break;
}
//echo '<h2>'.$langmessage['Import/Export'].'</h2>';
echo '<h2>' . $langmessage['Export'] . '</h2>';
echo $langmessage['Export About'];
$this->ExportForm();
echo '<br/>';
$this->Exported();
}
示例15: admin_uploaded
function admin_uploaded()
{
$file_cmd = common::GetCommand('file_cmd');
if (!empty($file_cmd) || isset($_REQUEST['show']) && $_REQUEST['show'] == 'inline') {
$this->do_admin_uploaded($file_cmd);
} else {
$this->elFinder();
}
}