示例#1
0
    function writeConfig()
    {
        $this->writePage();
        ?>
<form action="<?php 
        echo SB_FORM_ACTION_EXECUTOR;
        ?>
" method="POST">
<table>
<tr><th>DB Host Name</th></tr>
<tr><td><input name="host" value="<?php 
        echo $this->host;
        ?>
"></tr>
<tr><th>DB Username</th></tr>
<tr><td><input name="username" value="<?php 
        echo $this->user;
        ?>
"></tr>
<tr><th>DB Password</th></tr>
<tr><td><input type="password" name="password" value="<?php 
        echo $this->pass;
        ?>
"></tr>
<tr><th>DB Repeat Password</th></tr>
<tr><td><input  type="password" name="repeat" value="<?php 
        echo $this->pass2;
        ?>
"></tr>
<tr><th>Database Name</th></tr>
<tr><td><input name="name" value="<?php 
        echo $this->name;
        ?>
"></tr>
</table>

<p>
<input type="submit" name="command" value="Check Settings">
<input type="submit" name="command" value="Create Database">
Use any of the following to create file <strong>config.inc.php</strong>
and place it to your <strong>adm</strong> subdirectory of your
SiteBar installation.
<input type="submit" name="command" value="Write To File">
If "Write To File" does not work, do not
waste time setting the rights, just download the file and upload
it to the <strong>adm</strong> manually!
<input type="submit" name="command" value="Download Settings">
<input type="submit" name="command" value="Preview Settings">
</form>

<?php 
        SB_Page::foot();
    }
示例#2
0
    </p>
  </div>
</div>
<div id="trailer">
    <?php 
echo SB_P('integrator::copyright3');
?>
</div>
</div>
<div id="sponsorIntegratorVerticalRight"><?php 
$sponsor->integratorVerticalRight();
?>
</div>

<?php 
SB_Page::foot();
function IEInstall()
{
    $install = $_REQUEST['install'];
    $code = '{3F218DFB-00FF-297C-4D54-57696C4A6F6F}';
    $title = 'SiteBar';
    $url = SB_Page::absBaseUrl() . 'index.php';
    $reg = '';
    $filename = '';
    $ctxUrl = SB_Page::absBaseUrl() . 'ctxmenu.php';
    require_once './inc/converter.inc.php';
    $charsetKey = 'Charset in MS Windows';
    $c = new SB_Converter(!$um || $um->getParam('config', 'use_conv_engine'), SB_T($charsetKey) == $charsetKey ? null : SB_T($charsetKey));
    $addLink = $c->fromUTF8(SB_T('Add Link to SiteBar'));
    $addPage = $c->fromUTF8(SB_T('Add Page to SiteBar'));
    if ($install) {
示例#3
0
    function create()
    {
        SB_Page::head('Edit Translation', 'siteBarLocale');
        ?>
<h2>Create Translation</h2>
[<a href="translator.php">Back to Translation List</a>]
<p>
<?php 
        if (isset($_REQUEST['save'])) {
            $ok = true;
            foreach (array('newdir', 'language', 'author', 'url') as $name) {
                if (!isset($_REQUEST[$name]) || !strlen($_REQUEST[$name])) {
                    $ok = false;
                    echo "Field {$name} must be filled!<br>";
                }
            }
            if ($ok) {
                $lang = $_REQUEST['newdir'];
                if (!mkdir('./locale/' . $lang)) {
                    $this->writeErrors(true);
                    die('Cannot create directory!');
                }
                chmod('./locale/' . $lang, 0777);
                foreach ($this->parts as $part => $param) {
                    $file = sprintf($this->fmt, $lang, $param['file']);
                    if (!($fh = fopen($file, 'w'))) {
                        $this->writeErrors(true);
                        die("Cannot create file {$file}!");
                    }
                    fwrite($fh, "<?php \${$part} = array(); ?>");
                    fclose($fh);
                    chmod($file, 0666);
                }
                $file = sprintf($this->fmt, $lang, "info.inc.php");
                if (!($fh = fopen($file, 'w'))) {
                    die("Cannot create file {$file}!");
                }
                $text = <<<_INFO
<?php

\$info = array
(
    'language' => '{$_REQUEST['language']}',
    'authors' => array
    (
    '{$_REQUEST['author']}' => '{$_REQUEST['url']}',
    ),
);

?>
_INFO;
                fwrite($fh, $text);
                fclose($fh);
                chmod($file, 0666);
                echo 'Directory created!';
            }
        } else {
            ?>
<form method="POST">
<table>
<tr>
    <th>Directory</th>
    <td><input name="newdir"></td>
</tr>
<tr>
    <th>Language</th>
    <td><input name='language'></td>
</tr>
<tr>
    <th>Author</th>
    <td><input name='author'></td>
</tr>
<tr>
    <th>URL</th>
    <td><input name='url'></td>
</tr>
</table>
<input type='submit' name='save' value='Submit'>
<input type='reset'>
</form>
<?php 
        }
        if (!defined("EMBEDDED")) {
            SB_Page::foot();
        }
    }
示例#4
0
    function drawFoot()
    {
        $this->writeMenu('user', $this->userMenu);
        $this->sw->stop();
        $stat = array();
        $timeDb = $this->um->db->sw->elapsed;
        if ($timeDb >= $this->sw->elapsed) {
            $timeDb = $this->sw->elapsed - 0.01;
        }
        if ($this->um->getParam('config', 'show_statistics') && (!$this->um->isAnonymous() || $this->um->getParam('config', 'allow_sign_up'))) {
            $stat = array('links_shown' => $this->linkCount, 'nodes_shown' => $this->nodeCount, 'queries' => $this->um->db->count, 'time_db' => number_format($timeDb, 2), 'time_total' => number_format($this->sw->elapsed, 2), 'time_pct' => intval($timeDb / $this->sw->elapsed * 100));
            $this->um->statistics($stat);
            $this->tree->statistics($stat);
        }
        $this->hook->foot($this->um->config['release'] . (SB_DEVELOPMENT ? '-svn' : ''), $stat, $this->um);
        $sponsor = new SB_SponsorInterface($this->hook);
        $file = './inc/sponsor.inc.php';
        if (is_file($file)) {
            include_once $file;
            $sponsor = new SB_Sponsor($this->hook);
        }
        ?>
    <div id="sponsorSitebarBottom"><?php 
        $sponsor->sitebarBottom();
        ?>
</div>
<?php 
        if ($this->hasErrors()) {
            // Cannot be defined by skin
            echo '<div style="margin-top: 50px; color:yellow; background: red;">';
            $this->writeErrors();
            echo '</div>';
        }
        SB_Page::foot();
    }
示例#5
0
    echo SB_T($buttonName);
    ?>
">
    </div>
<?php 
}
?>
</div>
<?php 
if (!$cw->nobuttons && !$cw->inPlace()) {
    ?>
<div id="foot">
<?php 
    if (!$cw->bookmarklet) {
        ?>
    [<a href="javascript:window.opener.location.reload();window.close();"><?php 
        echo SB_T('Reload SiteBar');
        ?>
</a>]
<?php 
    }
    ?>
    [<a href="javascript:window.close();"><?php 
    echo SB_T('Close');
    ?>
</a>]
</div>
<?php 
}
$page->foot();