$tpl_list = []; $dirs = glob(THEMES_PATH . '*', GLOB_ONLYDIR); foreach ($dirs as $val) { if (is_file($val . DS . 'theme.ini')) { $options = parse_ini_file($val . DS . 'theme.ini'); if (isset($options['name'], $options['author'], $options['author_url'], $options['author_email'], $options['description']) && is_file($val . DS . 'theme.png')) { $dir = basename($val); $options['thumbinal'] = App::request()->getBaseUrl() . '/themes/' . $dir . '/theme.png'; $tpl_list[$dir] = $options; } } } ksort($tpl_list); return $tpl_list; } $themes = getThemesList(); $act = filter_input(INPUT_GET, 'act', FILTER_SANITIZE_STRING); $mod = filter_input(INPUT_GET, 'mod', FILTER_SANITIZE_STRING); if ($act == 'set' && isset($themes[$mod])) { $theme = $themes[$mod]; $description = '<br/><dl class="description">' . '<dt class="wide"><img src="' . $themes[$mod]['thumbinal'] . '" alt=""/></dt>' . '<dd>' . '<div class="header">' . $theme['name'] . '</div>' . (!empty($theme['author']) ? '<strong>' . _m('Author') . '</strong>: ' . htmlspecialchars($theme['author']) : '') . (!empty($theme['author_url']) ? '<br/><strong>' . _m('Site') . '</strong>: ' . htmlspecialchars($theme['author_url']) : '') . (!empty($theme['author_email']) ? '<br/><strong>Email</strong>: ' . htmlspecialchars($theme['author_email']) : '') . (!empty($theme['description']) ? '<br/><strong>' . _m('Description') . '</strong>: ' . htmlspecialchars($theme['description']) : '') . '</dd></dl>'; $form = new Mobicms\Form\Form(['action' => App::request()->getUri()]); $form->title(_m('Choose Skin'))->html($description)->divider()->element('submit', 'submit', ['value' => _m('Choose'), 'class' => 'btn btn-primary'])->html('<a class="btn btn-link" href="../">' . _s('Back') . '</a>'); if ($form->process() === true) { // $stmt = App::db()->prepare("UPDATE `" . TP . "usr__users` SET `avatar` = ? WHERE `id` = " . App::user()->id); // $stmt->execute([$image]); // $stmt = null; // // @unlink(FILES_PATH . 'users' . DS . 'avatar' . DS . Users::$data['id'] . '.jpg'); // @unlink(FILES_PATH . 'users' . DS . 'avatar' . DS . Users::$data['id'] . '.gif'); //
<?php global $THEMEREX_shortname; $THEMEREX_shortname = 'wps'; // Prepare arrays $fonts = getThemeFontsList(false); $themes = getThemesList(false); $socials = getSocialsList(false); $puzzles = getPuzzlesList(false); $categories = getCategoriesList(false); $sidebars = getSidebarsList(false); $positions = getSidebarsPositions(false); $blog_styles = getBlogStylesList(false); $body_styles = getBodyStylesList(false); $sliders = getSlidersList(false); $yes_no = getYesNoList(false); $dir = getDirectionList(false); $show_hide = getShowHideList(false); $sorting = getSortingList(false); $ordering = getOrderingList(false); // Theme options arrays $THEMEREX_theme_options = array(); /* ############################### #### General #### ############################### */ $THEMEREX_theme_options[] = array("name" => __('General', 'themerex'), "override" => "category,post,page", "type" => "heading"); $THEMEREX_theme_options[] = array("name" => __('Contact form email', 'themerex'), "desc" => __('E-mail for send contact form and user registration data', 'themerex'), "id" => $THEMEREX_shortname . "_" . "contact_email", "std" => "", "type" => "text"); $THEMEREX_theme_options[] = array("name" => __('Favicon', 'themerex'), "desc" => __('Upload a 16px x 16px image that will represent your website\'s favicon.<br /><br /><em>To ensure cross-browser compatibility, we recommend converting the favicon into .ico format before uploading. (<a href="http://www.favicon.cc/">www.favicon.cc</a>)</em>', 'themerex'), "id" => $THEMEREX_shortname . "_" . "favicon", "std" => "", "type" => "upload"); $THEMEREX_theme_options[] = array("name" => __('Logo image', 'themerex'), "desc" => __('Upload logo image', 'themerex'), "id" => $THEMEREX_shortname . "_" . "logo_image", "std" => "", "type" => "mediamanager");
function main($error, $title, $sitename, $topname, $logo, $theme, $homepage) { include 'header.php'; list($title, $sitename, $topname, $logo, $theme, $homepage) = getSiteData(); $themeslist = getThemesList(); ?> <div id="main"> <div id="pageHeader"> <h1><span>Administration Area</span></h1> <h2><span>Edit site properties</span></h2> </div> <div class="contentBox"> <p class="error"><?php echo $error; ?> </p> <form method="post" action="properties.php"> <fieldset> <table> <caption>Site data</caption> <tr> <th>Title:</th> <td><input type="text" name="title" value="<?php echo $title; ?> " maxlength="60" /></td> </tr> <tr> <th>Name:</th> <td><input type="text" name="sitename" value="<?php echo $sitename; ?> " maxlength="60" /></td> </tr> <tr> <th>Slogan:</th> <td><input type="text" name="topname" value="<?php echo $topname; ?> " maxlength="60" /></td> </tr> <tr> <th>Logo:</th> <td> <select name="logo"> <option value="#">-- None --</option> <?php $res = sql_query("SELECT id, filename FROM jones_binarydata", $dbi); while (list($img_id, $img_filename) = sql_fetch_row($res, $dbi)) { ?> <option value="<?php echo $img_id; ?> "<?php if ($img_id == $logo) { echo " selected"; } ?> ><?php echo $img_filename; ?> </option> <?php } ?> </select> </td> </tr> <tr> <th>Theme:</th> <td> <select name="theme"> <?php for ($i = 0; $i < sizeof($themeslist); $i++) { if ($themeslist[$i] != "") { ?> <option value="<?php echo $themeslist[$i]; ?> " <?php if ($themeslist[$i] == $theme) { echo "selected"; } ?> ><?php echo $themeslist[$i]; ?> </option> <?php } } ?> </select> </td> </tr> <tr> <th>Homepage:</th> <td> <select name="homepage"> <option value="blog.php">Blog</option> <?php $result = sql_query("select id, label from jones_page", $dbi); while (list($page_id, $page_label) = sql_fetch_row($result, $dbi)) { ?> <option value="page.php?id=<?php echo $page_id; ?> " <?php $b = strcmp(trim($homepage), trim("page.php?id=" . $page_id)); if ($b == 0) { echo " selected"; } ?> ><?php echo $page_label; ?> </option> <?php } ?> </select> </td> </tr> <tr> <td class="buttons" colspan="2"> <input type="submit" value="Submit" /> <input type="reset" value="Reset" /> <input type="hidden" name="cmd" value="finish" /> </td> </tr> </table> </fieldset> </form> </div> <div class="backLink"> <a href="index.php">Back to Main Menu</a> </div> </div> <?php include 'footer.php'; }
"> </div> <div class="form-group"> <label for="TmpPath">Absolute path for tmp directory:</label> <input type="text" class="form-control" name="TmpPath" id="TmpPath" placeholder="/var/www/svnadmin" value="<?php echo $config['TmpPath']; ?> "> </div> <div class="form-group"> <label for="Theme">Theme:</label> <select name="Theme" class="form-control" id="Theme"> <?php foreach (getThemesList() as $k => $v) { ?> <option value="<?php echo $v; ?> "><?php echo $v; ?> </option> <?php } ?> </select> </div> <div class="form-group">
function showThemeSelector($name, $title) { static $themes; if (!isset($themes) || !$themes) { $themes = getThemesList(true); } $val = getValueGPC($name, 'default'); //get_custom_option($name); ?> <div class="co_form_subrow"> <input type="hidden" name="co_<?php echo $name; ?> " value="<?php echo $val; ?> " /> <select id="co_<?php echo $name; ?> " class="co_theme_selector"> <?php foreach ($themes as $k => $v) { echo '<option value="' . $k . '"' . ($k == $val ? ' selected="selected"' : '') . '>' . $v . '</option>'; } ?> </select> <span class="co_label_light"><?php echo $title; ?> </span> </div> <?php }