예제 #1
0
파일: calendar.php 프로젝트: Nazg-Gul/gate
 function calendar($name = '', $date = '')
 {
     calendar_include_stuff();
     if ($date == '') {
         $date = date('Y-m-d');
     }
     tplp('back/calendar', array('name' => $name, 'date' => $date));
     add_body_handler('onload', 'calendar_Init', array('"' . $name . '"'));
 }
예제 #2
0
파일: anchor.php 프로젝트: Nazg-Gul/gate
 function stencil_dnd_anchor($id = -1, $callback = '', $hint = '', $dragable = true)
 {
     global $anchor_appened, $CORE;
     $CORE->AddScriptFile('anchor.js');
     add_body_handler('onload', 'anchor_Register', array("'{$id}'", $callback));
     if (!$anchor_appened) {
         add_body_handler('onmousemove', 'anchor_OnMouseMove', array('event'));
         add_body_handler('onscroll', 'anchor_OnPageScroll', array('event'));
         add_body_handler('onmouseup', 'anchor_StopDrag', array());
         $anchor_appened = true;
     }
     return tpl('back/stencil/anchor', array('id' => $id, 'callback' => $callback, 'hint' => $hint, 'dragable' => $dragable));
 }
예제 #3
0
파일: iframe.php 프로젝트: Nazg-Gul/gate
 function iframe_editor($name, $innerHTML = '', $init = true, $handler_body = 'editor_form', $settings = array())
 {
     iframe_include_stuff();
     $res = tpl('back/iframe/form', array('name' => $name, 'innerHTML' => iframe_prepare_content($innerHTML), 'settings' => $settings));
     if ($init) {
         if (browser_engine() != 'DONKEY') {
             add_body_handler('onload', 'iframeEditor_Init', array('"' . $name . '"'));
         } else {
             $add = '<script language="JavaScript" type="text/javascript">' . 'iframeEditor_Init ("' . $name . '");</script>';
         }
     }
     handler_add($handler_body, 'onsubmit', 'iframeEditor_OnSubmit', array('"' . $name . '"'));
     return $res . $add;
 }
예제 #4
0
파일: login.php 프로젝트: Nazg-Gul/e-marsa
 * See the file COPYING.
 */
if ($PHP_SELF != '') {
    print 'HACKERS?';
    die;
}
global $login, $passwd;
$authorized = false;
if (trim($login) != '') {
    if (user_authorize(stripslashes($login), stripslashes($passwd))) {
        header('Location: content');
        $authorized = true;
    }
}
if (!$authorized) {
    add_body_handler('onload', 'getElementById ("login").focus');
    ?>
<div id="navigator">Административный интерфейс</div>
<form action="." method="POST">
  <div class="form" style="width: 460px; margin-left: 40px;">
    <div class="content">
      <div id="navigator">Введите ваше имя пользователя и пароль</div>
      <div class="contentSub"><span class="arr">Для работы в административном интерфейсе сайта &laquo;<a href="<?php 
    echo config_get('document-root');
    ?>
/articles/about"><?php 
    echo config_get('site-name');
    ?>
</a>&raquo; Вам необходимо представиться системе:</span></div>
      <table width="100%">
        <tr>
예제 #5
0
파일: main.php 프로젝트: Nazg-Gul/gate
 function CCore($url = '', $wiki = true)
 {
     global $DOCUMENT_ROOT, $content_type, $CORE, $ipc, $XPFS;
     debug_watchdog_clear();
     if ($url == '') {
         $url = config_get('document-root');
     }
     $this->wiki = $wiki;
     $this->URL = $url;
     $this->PAGE = new CVCPage();
     $this->PAGE->Init('title=GATE;');
     $CORE = $this;
     // Starting session
     session_start();
     // Set the internal encoding
     mb_internal_encoding(config_get('internal-charset'));
     // Connect to database
     db_connect(config_get('check-database'));
     // Initialize XPFS
     $XPFS = new XPFS();
     $XPFS->createVolume();
     // Initialize content stuff
     content_initialize();
     // Initialize wiki stuff
     wiki_initialize();
     // Initialie manage stuff
     manage_initialize();
     security_initialize();
     ipc_initialize();
     service_initialize();
     editor_initialize();
     $this->DeleteUnwanted();
     if ($ipc != '') {
         ipc_exec($ipc);
         die;
     } else {
         // Make default actions
         $this->ActionHandler();
         // Creating page
         $this->PAGE->AddStyle('content');
         $this->PAGE->AddStyle('pages');
         $this->PAGE->AddScript('language=JavaScript;type=text/javascript', "\n" . tpl('common/globals', array(), false));
         $this->PAGE->AddScriptFile('core.js');
         $this->PAGE->AddMeta('http-equiv=content-language;content=' . config_get('content-language'));
         $this->PAGE->AddMeta('name=url;content=' . config_get('meta-url'));
         $this->PAGE->AddMeta('name=keywords;content=' . config_get('meta-keywords'));
         $this->PAGE->AddMeta('name=description;content=' . config_get('meta-description'));
         $this->PAGE->AddMeta('http-equiv=Content-Type;content=text/html\\; charset\\=' . config_get('character-set'));
         $this->PAGE->AddMeta('name=robots;content=all');
         $this->PAGE->SetIcon(config_get('document-root') . '/pics/favicon.ico');
         add_body_handler('onmousemove', 'core_StoreMousePos', array('event'));
         if (browser_engine() == 'OPERA') {
             $this->PAGE->AddStyle('content_opera_rep');
         }
         foreach (config_get('default-scripts') as $k) {
             $this->AddScriptFile($k);
         }
     }
 }