Esempio n. 1
0
 function ctl_kft(){
     parent::adminPage();
     $this->kft=&$this->system->loadModel('service/kft');
     $this->certi_id=$this->kft->getCerti();
     $this->token=$this->kft->getToken();
     $this->API_URL='http://api-client.shopex.cn/api.php';
 }
Esempio n. 2
0
 function admin_sales_ctl()
 {
     parent::adminPage();
     $appmgr = $this->system->loadModel('system/appmgr');
     $tb_api =& $appmgr->load('tb_sales_download');
     $this->tb =& $tb_api;
 }
Esempio n. 3
0
 function ctl_certificate()
 {
     parent::adminPage();
     $this->lang = 'zh-cn';
     $this->base_url = 'http://service.shopex.cn/info.php';
     $this->sess_id = $this->system->session->sess_id;
     $this->license_url = "index.php?ctl=service/certificate&act=download";
 }
Esempio n. 4
0
 function objectPage()
 {
     parent::adminPage();
     $this->model =& $this->system->loadModel($this->object);
     $frontend =& $this->system->loadModel('system/frontend');
     $frontend->register_function('toolset', array(&$this, '_getTools'));
     $this->objectName = substr(get_class($this), 4);
     $this->path[] = array('text' => $this->name . '管理', 'url' => 'index.php?ctl=' . $_GET['ctl'] . '&act=index');
 }
 private function editRawPost($slug, $draft = false)
 {
     $post_folder = DATA_ROOT . '/posts/';
     if ($draft) {
         $post_folder = $post_folder . 'draft/';
     }
     //die($post_folder);
     $page = new adminPage('post_raw_edit.php');
     $post = new eatStaticBlogPost();
     if (file_exists($post_folder . $slug . '.txt')) {
         $post->data_file_path = $post_folder . $slug . '.txt';
     }
     if (file_exists($post_folder . $slug . '.md')) {
         $post->data_file_path = $post_folder . $slug . '.md';
     }
     if (file_exists($post->data_file_path)) {
         $page->context['title'] = "Edit Post";
         $post->hydrate();
     } else {
         $page->context['title'] = "New Post";
     }
     if (eatStatic::getValue('postback') == '1') {
         //die($slug);
         $post->raw_data = trim(eatStatic::getValue('raw_data', 'post'));
         $post->file_name = trim(eatStatic::getValue('file_name', 'post'));
         $post->original_file_name = trim(eatStatic::getValue('original_file_name', 'post'));
         //die($slug);
         // copy current file data to backups
         if ($slug != 'new') {
             copy($post->data_file_path, DATA_ROOT . '/posts/backup/' . $post->file_name . '.' . eatStatic::timestamp() . '.bak');
             if ($post->original_file_name != $post->file_name) {
                 //die($post->data_file_path);
                 // remove original
                 unlink($post->data_file_path);
                 $new_data_file_path = $post_folder . $post->file_name;
                 eatStatic::write_file($post->raw_data, $new_data_file_path);
             } else {
                 eatStatic::write_file($post->raw_data, $post->data_file_path);
             }
         } else {
             $post->data_file_path = $post_folder . $post->file_name;
             eatStatic::write_file($post->raw_data, $post->data_file_path);
             header('location:' . ADMIN_ROOT . 'posts/drafts/');
             die;
         }
     }
     $page->context['post'] = $post;
     //print_r($page);
     //die();
     $page->render();
 }
 private function listContents($sub_path = '')
 {
     $lib = new eatStaticMediaLibrary(DATA_ROOT . '/images/', $sub_path . '/');
     $page = new adminPage('images.php');
     // handle image upload
     if (eatStatic::getValue('postback', 'post') == "1") {
         $image = $lib->upload('images', $sub_path, 'file', 'image');
         if ($image != '') {
             $page->context['message'] = $image . ' uploaded';
         } else {
             $page->context['message'] = 'file not uploaded';
         }
     }
     // create new folder
     if (eatStatic::getValue('postback', 'post') == "2") {
         if (eatStatic::getValue('folder', 'post')) {
             $folder = $lib->createSubFolder(eatStatic::getValue('folder', 'post'));
         }
     }
     $page->context['contents'] = $lib->getContents();
     $page->context['title'] = "Images";
     $page->context['sub_path'] = $sub_path;
     $page->render();
 }
Esempio n. 7
0
 public function __construct()
 {
     parent::__construct();
     $this->addGet('url', 'showByURL');
 }
Esempio n. 8
0
 function admin_stat_ctl()
 {
     parent::adminPage();
 }
Esempio n. 9
0
 function ctl_template()
 {
     parent::adminPage();
     regex_file($_GET);
 }
Esempio n. 10
0
        $aEditTabs[100] = array('id' => 'tab-change-password', 'title' => __('c_c_user_Password'), 'content' => '');
        $aEditTabs[100]['content'] = '<h3>Mot de passe</h3>

		<form action="module.php" method="post">
			<fieldset>
				<legend>' . __('m_users_Edit_password') . '</legend>
				<div class="two-cols">
					<p class="field col"><label for="edit_password">' . __('c_c_user_Password') . '</label>' . form::password('edit_password', 40, 255, html::escapeHTML($edit_password)) . '</p>

					<p class="field col"><label for="edit_password_confirm">' . __('c_c_auth_confirm_password') . '</label>' . form::password('edit_password_confirm', 40, 255, html::escapeHTML($edit_password_confirm)) . '</p>
				</div>
				<div class="two-cols">
					<p class="field col"><label>' . form::checkbox('send_password_mail', 1, 0) . ' ' . __('m_users_Alert_user_by_email') . '</label></p>
				</div>
			</fieldset>
			<p>' . form::hidden('change_password', 1) . form::hidden('m', 'users') . form::hidden('action', 'edit') . form::hidden('id', $aEditPageInfos['iUserId']) . adminPage::formtoken() . '<input type="submit" value="' . __('c_c_action_Edit') . '" /></p>
		</form>';
    }
}
# -- CORE TRIGGER : adminModUsersEditDisplayTabs
$okt->triggers->callTrigger('adminModUsersEditDisplayTabs', $okt, $aEditPageInfos, $aEditTabs);
$aEditTabs->ksort();
# En-tête
require OKT_ADMIN_HEADER_FILE;
?>

<?php 
# buttons set
echo $okt->page->getButtonSet('users');
?>
Esempio n. 11
0
 function ctl_tools()
 {
     parent::adminPage();
     $this->path = array(array('text' => __('工具箱')));
 }
Esempio n. 12
0
 private function displayForms($url, $type, $title)
 {
     $res = '<h3>' . $title . '</h3>' . '<form action="' . html::escapeURL($url) . '" method="post">' . '<fieldset><legend>' . __('m_antispam_Add_IP_address') . '</legend><p>' . form::hidden(array('ip_type'), $type) . form::text(array('addip'), 18, 255) . ' ';
     $res .= adminPage::formtoken() . '<input type="submit" value="' . __('c_c_action_Add') . '"/></p>' . '</fieldset></form>';
     $rs = $this->getRules($type);
     if ($rs->isEmpty()) {
         $res .= '<p><strong>' . __('m_antispam_No_IP_address_in_list') . '</strong></p>';
     } else {
         $res .= '<form action="' . html::escapeURL($url) . '" method="post">' . '<fieldset><legend>' . __('m_antispam_IP_list') . '</legend>' . '<div style="' . $this->style_list . '">';
         while ($rs->fetch()) {
             $bits = explode(':', $rs->rule_content);
             $pattern = $bits[0];
             $ip = $bits[1];
             $bitmask = $bits[2];
             $p_style = $this->style_p;
             $res .= '<p style="' . $p_style . '"><label class="classic">' . form::checkbox(array('delip[]'), $rs->rule_id, false) . ' ' . html::escapeHTML($pattern) . '</label></p>';
         }
         $res .= '</div>' . '<p><input type="submit" value="' . __('c_c_action_Delete') . '"/>' . adminPage::formtoken() . form::hidden(array('ip_type'), $type) . '</p>' . '</fieldset></form>';
     }
     return $res;
 }
Esempio n. 13
0
 function objectPage()
 {
     parent::adminPage();
     $this->model =& $this->system->loadModel($this->object);
     $this->path[] = array('text' => $this->name . __('管理'), 'url' => 'index.php?ctl=' . $_GET['ctl'] . '&act=index');
 }
Esempio n. 14
0
 public function gui($url)
 {
     # Create list
     if (!empty($_POST['createlist'])) {
         try {
             $this->defaultWordsList();
             http::redirect($url . '&list=1');
         } catch (Exception $e) {
             $this->okt->error->set($e->getMessage());
         }
     }
     # Adding a word
     if (!empty($_POST['swa'])) {
         try {
             $this->addRule($_POST['swa']);
             http::redirect($url . '&added=1');
         } catch (Exception $e) {
             $okt->error->add($e->getMessage());
         }
     }
     # Removing spamwords
     if (!empty($_POST['swd']) && is_array($_POST['swd'])) {
         try {
             $this->removeRule($_POST['swd']);
             http::redirect($url . '&removed=1');
         } catch (Exception $e) {
             $okt->error->add($e->getMessage());
         }
     }
     /* DISPLAY
     		---------------------------------------------- */
     global $okt;
     $okt->page->messages->success('list', __('m_antispam_Words_successfully_added'));
     $okt->page->messages->success('added', __('m_antispam_Word_successfully_added'));
     $okt->page->messages->success('removed', __('m_antispam_Words_successfully_removed'));
     $res = '';
     $res .= '<form action="' . html::escapeURL($url) . '" method="post">' . '<fieldset><legend>' . __('m_antispam_Add_word') . '</legend>' . '<p>' . form::text('swa', 20, 128) . ' ';
     $res .= adminPage::formtoken() . '<input type="submit" value="' . __('c_c_action_Add') . '"/></p>' . '</fieldset>' . '</form>';
     $rs = $this->getRules();
     if ($rs->isEmpty()) {
         $res .= '<p><strong>' . __('m_antispam_No_word_in_list') . '</strong></p>';
     } else {
         $res .= '<form action="' . html::escapeURL($url) . '" method="post">' . '<fieldset><legend>' . __('m_antispam_List') . '</legend>' . '<div style="' . $this->style_list . '">';
         while ($rs->fetch()) {
             $disabled_word = false;
             $p_style = $this->style_p;
             $res .= '<p style="' . $p_style . '"><label class="classic">' . form::checkbox(array('swd[]'), $rs->rule_id, false) . ' ' . html::escapeHTML($rs->rule_content) . '</label></p>';
         }
         $res .= '</div>' . '<p>' . form::hidden(array('spamwords'), 1) . adminPage::formtoken() . '<input type="submit" value="' . __('m_antispam_Delete_selected_words') . '"/></p>' . '</fieldset></form>';
     }
     $res .= '<form action="' . html::escapeURL($url) . '" method="post">' . '<p><input type="submit" value="' . __('m_antispam_Create_default_wordlist') . '" />' . form::hidden(array('spamwords'), 1) . form::hidden(array('createlist'), 1) . adminPage::formtoken() . '</p>' . '</form>';
     return $res;
 }
Esempio n. 15
0
 public function __construct()
 {
     parent::__construct();
     $this->addPost('group,permissions', 'update');
 }
Esempio n. 16
0
 function ctl_addon()
 {
     $this->path[] = array('text' => '工具箱', 'url' => 'index.php?ctl=system/tools&act=welcome');
     $this->path[] = array('text' => '网店扩展');
     parent::adminPage();
 }
Esempio n. 17
0
<?php

require "key.php";
$admin = new adminPage();
/**
 * Created by PhpStorm.
 * User: ITCOMP03
 * Date: 12/3/2015
 * Time: 9:25 AM
 */
switch ($_GET['aksi']) {
    default:
        try {
            $admin->beginTransaction();
            $admin->query("SELECT * from movie");
            $admin->execute();
            $row = $admin->fetchAll();
            $admin->endTransaction();
        } catch (PDOException $e) {
            $err_kon .= "<div class='alert alert-danger'>{$e->getCode()} : Terjadi ERROR dalam pemanggilan data</div>";
        }
        ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta content="text/html; charset=iso-8859-1" http-equiv="content-type"/>
    <title>Show Table Sticker History</title>
    <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <link href="dataTables/dataTables.bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <script type="application/javascript" src="dataTables/jQuery/jquery-1.11.3.min.js"></script>
Esempio n. 18
0
 public function __construct()
 {
     parent::__construct();
     $this->addPost('testId', 'test');
 }
Esempio n. 19
0
 /**
  * construct the wss
  */
 function ctl_wss()
 {
     parent::adminPage();
     $this->ENCODESTR = 'A34dfwfF';
 }
 function __construct($path)
 {
     require_once EATSTATIC_ROOT . '/eatStaticCSRF.class.php';
     $csrf = new eatStaticCSRF();
     switch ($path[2]) {
         case "":
             $page = new adminPage('login_form.php');
             if (eatStatic::getValue('postback', 'post') == '1') {
                 $csrf->verifyRequest();
                 $email = eatStatic::getValue('email', 'post');
                 $password = eatStatic::getValue('password', 'post');
                 if ($this->validUser($email, $password)) {
                     $_SESSION['admin'] = 1;
                     $_SESSION['admin_user'] = $email;
                     eatStaticAdminController::redirect("");
                 } else {
                     $page->context['error_message'] = 'Invalid username or password';
                 }
             }
             $page->context['title'] = "Log in";
             $page->context['show_navbar'] = false;
             $page->context['body_class'] = 'login-page';
             $page->context['csrf'] = $csrf;
             $page->render();
             break;
     }
 }
Esempio n. 21
0
 function _pageErrorHandler($errno, $errstr, $errfile, $errline)
 {
     if ($errstr == '0x015') {
         // 取消所有与supplier 相关的同步任务
         $this->_cancelTask($_REQUEST['supplier_id']);
         if ($_REQUEST['act'] != 'index' && $_REQUEST['act'] != 'supplierList') {
             $this->_err_process('供应商:' . $_REQUEST['supplier_id'] . '服务暂时不可用', 'page', 'index.php?ctl=distribution/supplier&act=index');
         }
     }
     parent::_pageErrorHandler($errno, $errstr, $errfile, $errline);
 }
Esempio n. 22
0
 public function __construct($tplPath, HttpRequest $request)
 {
     parent::__construct();
     $this->view = new View($tplPath);
     $this->view->set('request', $request);
 }
Esempio n. 23
0
 function ctl_dashboard()
 {
     parent::adminPage();
     $system =& $GLOBALS['system'];
     $system->__session_close(false);
 }
Esempio n. 24
0
        echo '<p>' . __('No detail') . '</p>';
    } else {
        echo '<ul>';
        foreach ($file->media_meta as $k => $v) {
            if ((string) $v) {
                echo '<li><strong>' . $k . ':</strong> ' . html::escapeHTML($v) . '</li>';
            }
        }
        echo '</ul>';
    }
}
if ($file->editable && $core_media_writable) {
    if ($file->media_type == 'image') {
        echo '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset><legend>' . __('Update thumbnails') . '</legend>' . '<p>' . __('This will create or update thumbnails for this image.') . '</p>' . '<p><input type="submit" name="thumbs" value="' . __('update thumbnails') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>';
    }
    if ($file->type == 'application/zip') {
        $inflate_combo = array(__('Extract in a new directory') => 'new', __('Extract in current directory') => 'current');
        echo '<form class="clear" id="file-unzip" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset><legend>' . __('Extract archive') . '</legend>' . '<ul>' . '<li><strong>' . __('Extract in a new directory') . '</strong> : ' . __('This will extract archive in a new directory that should not exists yet.') . '</li>' . '<li><strong>' . __('Extract in current directory') . '</strong> : ' . __('This will extract archive in current directory and will overwrite existing files or directory.') . '</li>' . '</ul>' . '<p><label class="classic">' . __('Extract mode:') . ' ' . form::select('inflate_mode', $inflate_combo, 'new') . '</label> ' . '<input type="submit" name="unzip" value="' . __('c_c_action_extract') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>';
    }
    echo '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset><legend>' . __('Change media properties') . '</legend>' . '<p class="field"><label>' . __('File name:') . '</label>' . form::text('media_file', 30, 255, html::escapeHTML($file->basename)) . '</p>' . '<p class="field"><label>' . __('File title:') . '</label>' . form::text('media_title', 30, 255, html::escapeHTML($file->media_title)) . '</p>' . '<p class="field"><label>' . __('File date:') . '</label>' . form::text('media_dt', 16, 16, html::escapeHTML($file->media_dtstr)) . '</p>' . '<p class="field"><label class="classic">' . form::checkbox('media_private', 1, $file->media_priv) . ' ' . __('Private') . '</label></p>' . '<p class="field"><label>' . __('New directory:') . '</label>' . form::select('media_path', $dirs_combo, dirname($file->relname)) . '</p>' . '<p><input type="submit" value="' . __('c_c_action_save') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>';
    echo '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post" enctype="multipart/form-data">' . '<fieldset><legend>' . __('Change file') . '</legend>' . '<div>' . form::hidden(array('MAX_FILE_SIZE'), OKT_MAX_UPLOAD_SIZE) . '</div>' . '<p class="field"><label for="upfile">' . __('Choose a file:') . '</label>' . '<input type="file" id="upfile" name="upfile" size="35" /></p>' . '<p class="note">' . sprintf(__('c_c_maximum_file_size_%s'), util::l10nFileSize(OKT_MAX_UPLOAD_SIZE)) . '</p>' . '<p><input type="submit" value="' . __('c_c_action_send') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>';
}
echo '</div>';
echo '</div>';
echo '</div>';
# Pied-de-page
if ($popup) {
    require OKT_ADMIN_FOOTER_SIMPLE_FILE;
} else {
    require OKT_ADMIN_FOOTER_FILE;
}
Esempio n. 25
0
</td>
			<td class="<?php 
        echo $td_class;
        ?>
"><?php 
        echo $f->hasGUI() ? '<a href="' . html::escapeHTML($f->guiURL()) . '">' . __('m_antispam_Filter_configuration') . '</a>' : '&nbsp;';
        ?>
</td>
		</tr>
	<?php 
        $i++;
    }
    ?>

	</tbody></table>
	<p><?php 
    echo form::hidden('filters_order', '') . form::hidden('m', 'antispam') . adminPage::formtoken();
    ?>
	<input type="submit" name="filters_upd" value="<?php 
    _e('c_c_action_Save');
    ?>
" /></p>
	</fieldset></form>

<?php 
}
?>

<?php 
# Pied-de-page
require OKT_ADMIN_FOOTER_FILE;
Esempio n. 26
0
    if (!$digest_is_readable) {
        echo '<p><span class="icon error"></span>' . __('c_a_update_digest_file_not_readable') . '</p>';
    }
    echo '<p><a href="' . $p_url . '&amp;update_db=1" class="icon database_refresh">' . __('c_a_update_database') . '</a></p>';
}
if (!empty($_GET['update_db'])) {
    echo $oChecklist->getHTML();
    if ($oChecklist->checkAll()) {
        echo '<p>' . __('c_a_update_database_successful') . ' ' . '<a href="' . $p_url . '">' . __('c_a_update_complete_update') . '</a></p>';
    } else {
        echo '<p><span class="icon error"></span> ' . __('c_a_update_database_blocking_errors_occurred') . '</p>';
    }
} elseif ($digest_is_readable && !$step) {
    if (empty($new_v)) {
        echo '<p><strong>' . __('c_a_update_no_newer_version_available') . '</strong></p>';
    } else {
        echo '<p class="static-msg">' . sprintf(__('c_a_update_okatea_%s_available'), $new_v) . '</p>' . '<p>' . __('c_a_update_to_upgrade_instructions') . '</p>' . '<form action="configuration.php" method="get">' . '<p><label for="do_not_check">' . form::checkbox('do_not_check', 1, false) . __('c_a_update_do_not_check_file_integrity') . '</label></p>' . '<p><input type="hidden" name="step" value="check" />' . '<input type="hidden" name="action" value="update" />' . '<input type="submit" class="lazy-load" value="' . __('c_a_update_action') . '" /></p>' . '</form>';
    }
    if (!empty($archives)) {
        echo '<h3>' . __('c_a_update_backup_files') . '</h3>' . '<p>' . __('c_a_update_backup_instructions') . '</p>';
        echo '<form action="configuration.php" method="post">';
        foreach ($archives as $v) {
            echo '<p><label class="classic">' . form::radio(array('backup_file'), html::escapeHTML($v)) . ' ' . html::escapeHTML($v) . '</label></p>';
        }
        echo '<p><strong>' . __('c_a_update_backup_warning') . '</strong> ' . sprintf(__('c_a_update_should_not_revert_prior_%s'), end($archives)) . '</p>' . '<p><input type="submit" name="b_del" value="' . __('c_a_update_delete_selected_file') . '" /> ' . '<input type="submit" name="b_revert" class="lazy-load" value="' . __('c_a_update_revert_selected_file') . '" />' . '<input type="hidden" name="action" value="update" />' . adminPage::formtoken() . '</p>' . '</form>';
    }
} elseif ($step == 'done' && !$okt->error->hasError()) {
    echo '<p class="message">' . __('c_a_update_congratulations') . ' <strong><a href="' . $p_url . '">' . __('c_a_update_finish') . '</a></strong>' . '</p>';
}
# Pied-de-page
require OKT_ADMIN_FOOTER_FILE;
Esempio n. 27
0
}
?>
		</select></p>
	</div>

	<div id="uploader"><p><?php 
_e('m_galleries_plupload_update_or_change_browser');
?>
</p></div>

	<p><?php 
echo form::hidden('m', 'galleries');
?>
	<?php 
echo form::hidden('action', 'add_multiples');
?>
	<?php 
echo form::hidden('sended', 1);
?>
	<?php 
echo adminPage::formtoken();
?>
	<input type="submit" class="lazy-load" value="<?php 
_e('c_c_action_add');
?>
" /></p>
</form>

<?php 
# Pied-de-page
require OKT_ADMIN_FOOTER_FILE;
Esempio n. 28
0
 public function __construct()
 {
     parent::__construct();
     $this->addPost('content', 'store');
 }
Esempio n. 29
0
 function ctl_demo_data()
 {
     parent::adminPage();
 }
Esempio n. 30
0
 public function __construct()
 {
     parent::__construct();
     $this->addGet('document,index,fieldname,displayLimit', 'showByCount');
 }