Esempio n. 1
0
function updateSub($sub)
{
    global $lastPrint;
    if ($lastPrint != "sub") {
        echo "\nUpdated {$sub}";
    } else {
        echo ", {$sub}";
    }
    $lastPrint = "sub";
    $css = getStyle($sub);
    if (!$css) {
        touch("subs/{$sub}.min.css");
        return;
    }
    file_put_contents("cachedsubs/{$sub}.css", $css);
    $cT = new cssEmoteParser();
    $cT->parseString($css, $sub, true);
    $cT->finalize();
    $d = $cT->toString();
    if (!$d && file_exists("subs/{$sub}.min.css")) {
        unlink("subs/{$sub}.min.css");
        $lastPrint = "delete";
        echo "\nDeleted {$sub} - empty!";
        return;
    }
    file_put_contents("subs/{$sub}.min.css", $d);
    file_put_contents("subs/{$sub}.count", $cT->emoteCount);
}
 public function render()
 {
     getDisplay()->setTitle(Settings::getWebsiteName() . " - " . l("Error") . " " . $this->errorCode);
     getDisplay()->setTemplateVariable("error_code", $this->errorCode);
     getStyle()->run();
     getDisplay()->add("header");
     getDisplay()->add("error");
     getDisplay()->add("footer");
     getDisplay()->render();
 }
 public function render()
 {
     getDisplay()->setTitle(Settings::getWebsiteName() . " - " . l("HOME"));
     getDisplay()->setTemplateVariable("body", $this->body);
     getDisplay()->setTemplateVariable("articles", $this->articleHTML);
     getStyle()->run();
     getDisplay()->add("header");
     getDisplay()->add("index");
     getDisplay()->add("footer");
     getDisplay()->render();
 }
 public function render()
 {
     getDisplay()->setTitle(Settings::getWebsiteName() . " - " . $this->page->getTitle());
     getDisplay()->setTemplateVariable("body", $this->body);
     getDisplay()->setTemplateVariable("page", $this->page);
     getStyle()->run();
     getDisplay()->add("header");
     getDisplay()->add("page");
     getDisplay()->add("footer");
     getDisplay()->render();
 }
 public function render()
 {
     getDisplay()->setTitle(Settings::getWebsiteName() . " - " . $this->article->getTitle());
     getDisplay()->setTemplateVariable("body", $this->body);
     getDisplay()->addHTML('<meta name="keywords" content="' . $this->article->getTagsString() . '"/>', 'head');
     getDisplay()->setTemplateVariable("article", $this->article);
     getDisplay()->setTemplateVariable("comments", $this->commentHTML);
     getStyle()->run();
     getDisplay()->add("header");
     getDisplay()->add("article");
     getDisplay()->add("footer");
     getDisplay()->render();
 }
Esempio n. 6
0
        exit;
    } else {
        $newLCID = $comment->getID();
    }
}
$newComments = null;
try {
    $newComments = orongo_query("action=fetch&object=comment&max=1000000&offset=" . Security::escape($_POST['offset']) . "&order=comment.id,asc&where=article.id:" . Security::escape($_POST['article']));
} catch (Exception $e) {
    die("500");
}
$newComments = array_reverse($newComments);
$html = "";
if (getStyle()->doCommentHTML()) {
    try {
        $html = getStyle()->getCommentsHTML($newComments);
    } catch (Exception $e) {
        foreach ($newComments as $comment) {
            $html .= $comment->toHTML();
        }
    }
} else {
    foreach ($newComments as $comment) {
        $html .= $comment->toHTML();
    }
}
$succesArray = array();
$succesArray["response"] = "Ok!";
$succesArray["response_code"] = OK;
$succesArray["count"] = count($newComments);
$succesArray["html"] = $html;
Esempio n. 7
0
        //trck_BF_Unload($this->font);
    }
    public function changePostfixName($postfixID, $newName)
    {
        if (!isset($this->systems_data[$this->system][$postfixID])) {
            //throw Exception (Not exists)
            return null;
        }
        $this->systems_data[$this->system][$postfixID]['name'] = $newName;
    }
    private function throwException($function, $code, $message)
    {
        $E = new Exception('TorrentBar exception in ' . $function . ': ' . $message, $code);
        throw $E;
    }
}
//===========================================================================
// Main body
//===========================================================================
$user_id = getParam();
$style_id = getStyle();
define('BB_ROOT', '1');
include $torrentpier_config_path;
try {
    $torrentbar = new TorrentBar($user_id);
    $template = $torrentbar->useTemplate($style_id);
    include $template;
    $torrentbar->Finalize();
} catch (Exception $E) {
    echo $E->getMessage() . " (Code:" . $E->getCode() . ")";
}
/**
 * author: coster
 * date: 5.10.05
 * setzt ein stylesheet mit dem klassennamen $classname
 * */
function setStyle($classname, $wert, $gastro_id)
{
    global $db;
    $style = getStyle($classname, $gastro_id);
    if (!empty($style)) {
        $query = "UPDATE \n\t\t\t\tBOOKLINE_CSS\n\t\t\t\tset\n\t\t\t\tWERT = '{$wert}'\n\t\t\t\tWHERE\n\t\t\t\tGASTRO_ID = '{$gastro_id}'\n\t\t\t\tand\n\t\t\t\tClassname = '{$classname}'\n\t\t\t\t";
    } else {
        $query = "insert into \n\t\t\t\tBOOKLINE_CSS\n\t\t\t\t(GASTRO_ID,CLASSNAME,WERT)\n\t\t\t\tvalues\n\t\t\t\t('{$gastro_id}','{$classname}','{$wert}')\n\t\t\t\t";
    }
    $res = $db->Execute($query);
    if (!$res) {
        return false;
    }
    return $db->Insert_ID();
}
 public function render()
 {
     getDisplay()->setTitle(Settings::getWebsiteName() . " - " . $this->pageTitle);
     getDisplay()->setTemplateVariable("body", $this->body);
     if (count($this->msgs) > 0) {
         $msgstring = "";
         foreach ($this->msgs as $msg) {
             if (!is_array($msg)) {
                 continue;
             }
             $msgstring .= '<h4 class="alert_' . $msg['msgtype'] . '">' . $msg['msg'] . "</h4>";
         }
         getDisplay()->setTemplateVariable("msgs", $msgstring);
     }
     $objectshtml = "";
     foreach ($this->objects as $object) {
         if ($object instanceof AdminFrontendObject == false) {
             continue;
         }
         $objectshtml .= $object->toHTML();
     }
     getDisplay()->setTemplateVariable("objects", $objectshtml);
     getDisplay()->setTemplateVariable("current_page", $this->pageTitle);
     getDisplay()->setTemplateVariable("style_url", Settings::getWebsiteURL() . "orongo-admin/theme/");
     getStyle()->run();
     getDisplay()->add("header");
     getDisplay()->add($this->pageTemplate);
     getDisplay()->render();
 }
Esempio n. 10
0
function style_function($name)
{
    $basePath = basePath();
    $style = getStyle();
    $stylePath = $basePath . "/astyle/{$style}";
    if (file_exists($stylePath . "/include.php")) {
        include_once $stylePath . "/include.php";
        if (function_exists($style . "_" . $name)) {
            return $style . "_" . $name;
        } else {
            return FALSE;
        }
    } else {
        return FALSE;
    }
}
Esempio n. 11
0
/**
 * Render an HTML page
 */
function page_render($body, $user, $title, $h1 = null, $login = false)
{
    $h1 = $h1 ? $h1 : $title;
    if ($user) {
        $msg = sprintf(logged_in_pat, link_render($user));
        $nav = array('logout' => 'Log Out', 'sites' => 'Remembered Sites');
        $navigation = navigation_render($msg, $nav);
    } else {
        if (!$login) {
            $msg = link_render(buildURL('login'), 'Log In');
            $navigation = navigation_render($msg, array());
        } else {
            $navigation = '';
        }
    }
    $style = getStyle();
    $text = sprintf(page_template, $title, $style, $navigation, $h1, $body);
    // No special headers here
    $headers = array();
    return array($headers, $text);
}
if (getUser()->getRank() != RANK_ADMIN) {
    header("Location: " . orongoURL("orongo-admin/index.php?msg=0"));
    exit;
}
if (!isset($_POST['website_url']) || !isset($_POST['website_style']) || !isset($_POST['website_name']) || !isset($_POST['website_lang']) || !isset($_POST['show_archive'])) {
    header("Location: " . orongoURL("orongo-admin/orongo-settings.php"));
    exit;
}
if (Settings::getWebsiteURL() != $_POST['website_url'] && !empty($_POST['website_url'])) {
    Settings::setWebsiteURL($_POST['website_url']);
}
if (Settings::getWebsiteName() != $_POST['website_name'] && !empty($_POST['website_name'])) {
    Settings::setWebsiteName($_POST['website_name']);
}
if (Settings::getLanguageName() != $_POST['website_lang'] && !empty($_POST['website_lang'])) {
    Settings::setLanguageName($_POST['website_lang']);
}
if (strval(Settings::showArchive()) != $_POST['show_archive'] && !empty($_POST['show_archive'])) {
    Settings::setShowArchive($_POST['show_archive']);
}
if (getStyle()->getStyleFolder() != $_POST['website_style'] && file_exists(ROOT . "/themes/" . $_POST['website_style']) . "/info.xml") {
    try {
        Settings::setStyle($_POST['website_style']);
    } catch (Exception $e) {
        $msgbox = new MessageBox("Can't install style: " . $_POST['website_style']);
        $msgbox->bindException($e);
        die($msgbox->getImports() . $msgbox->toHTML());
    }
}
header("Location: " . orongoURL("orongo-admin/orongo-settings.php?msg=0"));
exit;
Esempio n. 13
0
    if (isset($_REQUEST['gen'])) {
        $result = mysql_query("SELECT varname, vardesc, vartype, '' FROM {$database} WHERE {$whereString} ORDER BY orderId");
        if ($club_id != 0) {
            $whereString = "id = '" . $club_id . "'";
            $clubInfo = clubInfo($club_id);
            //array (club name, club description, open_time, close_time, num_recommendations)
            $sectionheader = "Supplement: " . $clubInfo[0];
        } else {
            $sectionheader = "General Application";
        }
        $createResult = generatePDFByResult($result, "../pdf/", $sectionheader);
        if (!$createResult[0]) {
            $error = "Error during PDF generation: " . $createResult[1];
        } else {
            $basePath = basePath();
            $style = getStyle();
            $stylePath = $basePath . "/astyle/{$style}";
            $message = "<a href=\"../pdf/" . $createResult[1] . ".pdf\"><img src=\"" . $stylePath . "/images/application_word.png\" width=\"64\"></a>";
            $success = "PDF made!";
        }
    }
    if (isset($error)) {
        get_page_advanced("gen_pdf", "admin", array('error' => $error, 'message' => $message, 'categories' => $categories));
    } else {
        if (isset($success)) {
            get_page_advanced("gen_pdf", "admin", array('success' => $success, 'message' => $message, 'categories' => $categories));
        } else {
            get_page_advanced("gen_pdf", "admin", array('message' => $message, 'categories' => $categories));
        }
    }
} else {
Esempio n. 14
0
                                    if ($stylesheet == FREI) {
                                        $designFuer = "frei";
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
//uebersetzen:
$designFuer = getUebersetzung($designFuer);
//vorherigen style aus datenbank auslesen:
$style = getStyle($stylesheet, $vermieter_id);
?>

<p class="<?php 
echo STANDARD_SCHRIFT_BOLD;
?>
"><?php 
echo getUebersetzung("Design f�r");
?>
 "<?php 
echo $designFuer;
?>
" <?php 
echo getUebersetzung("bearbeiten");
?>
</p>
Esempio n. 15
0
    }
}
?>
<link href="../../lib/css/page.css" type="text/css" rel="stylesheet" />
<link href="../../lib/css/personal.css" type="text/css" rel="stylesheet" />
<section class="main-wrap">
	<ul class="list login-type">
		<?php 
foreach ($login_icon['icons'] as $k => $v) {
    ?>
			<li><a class="anchor <?php 
    echo $v;
    ?>
" href="login_form.php?type=<?php 
    echo $v;
    ?>
"><img src="../../lib/images/personal/icon_<?php 
    echo $v;
    ?>
.png" />
				<span>用<?php 
    getStyle($v);
    ?>
登录</span></a></li>
		<?php 
}
?>
	</ul>
</section>
<?php 
require '../../lib/footer/footer.php';
/**
 * @author Jaco Ruit
 */
require '../startOrongo.php';
startOrongo();
setCurrentPage('admin_orongo-settings');
Security::promptAuth();
if (getUser()->getRank() != RANK_ADMIN) {
    header("Location: " . orongoURL("orongo-admin/index.php?msg=0"));
    exit;
}
if (getStyle()->isUsingPHP() == false) {
    header("Location: " . orongoURL("orongo-admin/index.php?msg=2"));
    exit;
}
$xml = @simplexml_load_file(getStyle()->getStylePath() . "info.xml");
$json = @json_encode($xml);
$info = @json_decode($json, true);
if (!is_array($info['style']['settings'])) {
    header("Location: " . orongoURL("orongo-admin/index.php?msg=2"));
    exit;
}
$styleSettings = getDatabase()->query("SELECT `setting` FROM `style_data` WHERE `style_main_class` = %s", $info['style']['main_class']);
foreach ($styleSettings as $setting) {
    if (isset($_POST[$setting['setting']])) {
        getDatabase()->update("style_data", array("setting_value" => $_POST[$setting['setting']]), "setting = %s", $setting['setting']);
    }
}
header("Location: " . orongoURL("orongo-admin/orongo-settings.php?msg=0"));
exit;
Esempio n. 17
0
                            }
                        }
                    }
                }
            }
        }
    }
}
if ($designFuer == "") {
    include_once $root . "/backoffice/templates/footer.inc.php";
    exit;
}
//uebersetzen:
$designFuer = getUebersetzung($designFuer);
//vorherigen style aus datenbank auslesen:
$style = getStyle($stylesheet, $gastro_id);
?>

<h2 style="margin-top:10px;"><?php 
echo getUebersetzung("Design für");
?>
 "<?php 
echo $designFuer;
?>
" <?php 
echo getUebersetzung("bearbeiten");
?>
</h2>
<form action="styleAendern.php" method="post" name="styles" target="_self" id="styles">
  <input name="stylesheet" type="hidden" value="<?php 
echo $stylesheet;
Esempio n. 18
0
File: chat.php Progetto: perrr/svada
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<meta charset="utf-8">
		<title>Svada Chat Client</title>
		<meta name="generator" content="Bootply" />
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link href="css/plugins/bootstrap.min.css" rel="stylesheet">
		<link href="css/plugins/jquery.mCustomScrollbar.css" rel="stylesheet">
		<link href="css/plugins/bootstrap-toggle.min.css" rel="stylesheet">
		<link href="css/plugins/font-awesome.min.css" rel="stylesheet">
		<!--[if lt IE 9]>
			<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
		<![endif]-->
		<link href="css/styles.css" rel="stylesheet">
		<?php 
echo getStyle($user['style']);
?>
	</head>
	<body>
		<?php 
include 'pages/splashscreen.php';
?>
		<div class="container" id="chat-top"></div>
		<div id="chat-menu"></div>
		<div class="container" id="chat-bottom">
			<div class="row">
				<div class="col-sm-2" id="sidebar">
					<div id="users"></div>
				</div>
				<div class="col-sm-10" id="mainbar">
					<div id="notifications"></div>
$styles = explode("\n", $content);
$aendern = false;
for ($i = 0; $i < count($styles); $i++) {
    $styles_sub = explode("{", $styles[$i]);
    if ($styles[$i] == "" || $styles[$i] == null) {
        continue;
    }
    if (count($styles_sub) < 2) {
        $fehler = true;
        $nachricht = "Diese Definition \"" . $styles[$i] . "\" ist ungültig!";
        include_once "./stylesHochladen.php";
        exit;
    }
    $klassname = $styles_sub[0];
    $werts_neu = explode(";", $styles_sub[1]);
    if ($style = getStyle($klassname, $gastro_id)) {
        $werts_alt = explode(";", $style);
        for ($j = 0; $j < count($werts_alt) - 1; $j++) {
            $werts_alt[$j] = update($werts_alt[$j], $werts_neu);
        }
        setStyle($klassname, getString($werts_alt), $gastro_id);
        $aendern = true;
    }
}
if ($aendern) {
    $info = true;
    $nachricht = "Die Designs wurden erfolgreich geändert!";
    include_once "./stylesHochladen.php";
    exit;
} else {
    $fehler = true;
Esempio n. 20
0
    }
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  <head>
     <title><?php 
echo TITLE;
?>
</title>
     <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" />
	 <meta name="viewport" content="width=device-width, maximum-scale=1">
     <?php 
echo "<link rel='stylesheet' type='text/css' href='./styles/" . getStyle($_SESSION['user']['code']['p_id'], $_SESSION['user']['code']['b_id']) . "/style.css' />";
?>
     
     <script language='javascript'>
     	function getElementByIdCompatible (the_id) {
if (typeof the_id != 'string') {
return the_id;
}

if (typeof document.getElementById != 'undefined') {
return document.getElementById(the_id);
} else if (typeof document.all != 'undefined') {
return document.all[the_id];
} else if (typeof document.layers != 'undefined') {
return document.layers[the_id];
} else {
Esempio n. 21
0
}
// Parse all input params
foreach ($_REQUEST as $key => $value) {
    ${$key} = $value;
}
if ($function == 'getOptions') {
    putRGOptions($RGTMPL_LIST);
} else {
    if ($function == 'newTemplate') {
        newTemplate($tmpl_name);
    } else {
        if ($function == 'delTemplate') {
            delTemplate($tmpl_name);
        } else {
            if ($function == 'getStyle') {
                getStyle($tmpl_name);
            } else {
                if ($function == 'getTemplate') {
                    getTemplate($tmpl_name);
                } else {
                    if ($function == 'saveTemplate') {
                        saveTemplate($tmpl_name);
                    }
                }
            }
        }
    }
}
### FUNCTIONS
function delTemplate($tmplName)
{
function mainHTML()
{
    global $schedulePID, $schedulePars, $debugString, $showLog;
    echo '<!DOCTYPE html>';
    echo '<html>';
    echo '<head>';
    echo '<meta name="viewport" content="width=550, initial-scale=1">';
    echo '<title>RPi Cam Download</title>';
    echo '<link rel="stylesheet" href="css/style_minified.css" />';
    echo '<link rel="stylesheet" href="' . getStyle() . '" />';
    echo '<script src="js/style_minified.js"></script>';
    echo '<script src="js/script.js"></script>';
    echo '</head>';
    echo '<body onload="schedule_rows()">';
    echo '<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">';
    echo '<div class="container">';
    echo '<div class="navbar-header">';
    if ($showLog) {
        echo '<a class="navbar-brand" href="schedule.php">';
    } else {
        echo '<a class="navbar-brand" href="' . ROOT_PHP . '">';
    }
    echo '<span class="glyphicon glyphicon-chevron-left"></span>Back - ' . CAM_STRING . '</a>';
    echo '</div>';
    echo '</div>';
    echo '</div>';
    echo '<div class="container-fluid">';
    echo '<form action="schedule.php" method="POST">';
    if ($debugString) {
        echo $debugString . "<br>";
    }
    if ($showLog) {
        echo "&nbsp&nbsp;<button class='btn btn-primary' type='submit' name='action' value='downloadlog'>" . BTN_DOWNLOADLOG . "</button>";
        echo "&nbsp&nbsp;<button class='btn btn-primary' type='submit' name='action' value='clearlog'>" . BTN_CLEARLOG . "</button><br><br>";
        displayLog();
    } else {
        echo '<div class="container-fluid text-center">';
        echo "&nbsp;&nbsp;<button class='btn btn-primary' type='submit' name='action' value='save'>" . BTN_SAVE . "</button>";
        echo "&nbsp;&nbsp;<button class='btn btn-primary' type='submit' name='action' value='backup'>" . BTN_BACKUP . "</button>";
        echo "&nbsp;&nbsp;<button class='btn btn-primary' type='submit' name='action' value='restore'>" . BTN_RESTORE . "</button>";
        echo "&nbsp;&nbsp;<button class='btn btn-primary' type='submit' name='action' value='showlog'>" . BTN_SHOWLOG . "</button>";
        echo '&nbsp;&nbsp;&nbsp;&nbsp;';
        if ($schedulePID != 0) {
            echo "<button class='btn btn-danger' type='submit' name='action' value='stop'>" . BTN_STOP . "</button>";
        } else {
            echo "<button class='btn btn-danger' type='submit' name='action' value='start'>" . BTN_START . "</button>";
        }
        echo "<br></div>";
        showScheduleSettings($schedulePars);
    }
    echo '</form>';
    echo '</div>';
    cmdHelp();
    echo '</body>';
    echo '</html>';
}
Esempio n. 23
0
require '../../lib/unit/nav.php';
?>

<link href="../../lib/css/page.css" type="text/css" rel="stylesheet" />
<link href="../../lib/css/personal.css" type="text/css" rel="stylesheet" />
<section class="main-wrap">
	<div class="login_form login_<?php 
echo $type;
?>
">
		<form method="post" action="login_confirm.php?type=<?php 
echo $type;
?>
">
			<div class="item username">
				<input type="text" name="username"  placeholder="请输入你的<?php 
getStyle($type);
?>
" value=""/>
			</div>
			<div class="item submit-btn">
				<a class="submit" href="login_confirm.php?type=<?php 
echo $type;
?>
">下一步</a>
			</div>
		</form>
	</div>
</section>
<?php 
require '../../lib/footer/footer.php';
Esempio n. 24
0
$config = readConfig($config, CONFIG_FILE1);
$config = readConfig($config, CONFIG_FILE2);
$video_fps = $config['video_fps'];
$divider = $config['divider'];
?>

<html>
   <head>
      <meta name="viewport" content="width=550, initial-scale=1">
      <title><?php 
echo CAM_STRING;
?>
</title>
      <link rel="stylesheet" href="css/style_minified.css" />
      <link rel="stylesheet" href="<?php 
echo getStyle();
?>
" />
      <script src="js/style_minified.js"></script>
      <script src="js/script.js"></script>
      <script src="js/pipan.js"></script>
      <script src="js/newajax.js"></script>
      <script src="js/updateStatusResult.js"></script>
      <script>setTimeout("newAJAXCommand('StatusResult.php',updateStatusResult,10000)",10000);</script>
   </head>
   <body onload="setTimeout('init(<?php 
echo "{$mjpegmode}, {$video_fps}, {$divider}";
?>
);', 100);">

Esempio n. 25
0
            }
            $xml = @simplexml_load_file($xmlFile);
            $json = @json_encode($xml);
            $info = @json_decode($json, true);
            $styles[$info['style']['name']] = $file;
        }
    }
}
$settingForm->addSelect("website_style", $styles);
$settingForm->addSelect("website_lang", $languages);
$settingForm->addButton("Save", true);
$settings->addObject($settingForm);
$xml = @simplexml_load_file(getStyle()->getStylePath() . "info.xml");
$json = @json_encode($xml);
$info = @json_decode($json, true);
if (is_array($info['style']['settings']) && getStyle()->isUsingPHP()) {
    $styleForm = new AdminFrontendForm(100, "Style Settings", "POST", orongoURL("actions/action_SaveStyleSettings.php"));
    $styleSettings = getDatabase()->query("SELECT `setting`, `setting_value` FROM `style_data` WHERE `style_main_class` = %s", $info['style']['main_class']);
    foreach ($styleSettings as $setting) {
        if (!isset($info['style']['settings'][$setting['setting']])) {
            continue;
        }
        $settingInfo = $info['style']['settings'][$setting['setting']];
        if ($settingInfo['type'] == 'boolean') {
            $selected = $setting['setting_value'] == 'false' ? l("No") : l("Yes");
            $styleForm->addRadios($settingInfo['description'], $setting['setting'], array(l("Yes") => "true", l("No") => "false"), $selected, false);
        } else {
            $styleForm->addInput($settingInfo['description'], $setting['setting'], "text", $setting['setting_value'], false, false, false);
        }
    }
    $styleForm->addButton("Save", true);