コード例 #1
0
ファイル: calendar.php プロジェクト: Vin985/clqweb
function c_monthChange($where)
{
    if (!isset($_GET['month']) or empty($_GET['month'])) {
        $_GET['month'] = date('n');
    }
    if (!isset($_GET['year']) or empty($_GET['year'])) {
        $_GET['year'] = date('Y');
    }
    $months = array('', i18n_r('calendar/January'), i18n_r('calendar/February'), i18n_r('calendar/March'), i18n_r('calendar/April'), i18n_r('calendar/May'), i18n_r('calendar/June'), i18n_r('calendar/July'), i18n_r('calendar/August'), i18n_r('calendar/September'), i18n_r('calendar/October'), i18n_r('calendar/November'), i18n_r('calendar/December'));
    $month_m = $_GET['month'] - 1;
    $month_p = $_GET['month'] + 1;
    $year_m = $_GET['year'] - 1;
    $year_p = $_GET['year'] + 1;
    echo '<center>';
    if ($_GET['month'] == 1) {
        $month_m = 12;
        echo '<a href="' . $where . '&month=' . $month_m . '&year=' . $year_m . '">' . $months[$month_m] . ' ' . $year_m . '</a>';
    } else {
        echo '<a href="' . $where . '&month=' . $month_m . '&year=' . $_GET['year'] . '">' . $months[$month_m] . ' ' . $_GET['year'] . '</a>';
    }
    echo ' << ' . $months[$_GET['month']] . ' ' . $_GET['year'] . ' >> ';
    if ($_GET['month'] == 12) {
        $month_p = 1;
        echo '<a href="' . $where . '&month=' . $month_p . '&year=' . $year_p . '">' . $months[$month_p] . ' ' . $year_p . '</a>';
    } else {
        echo '<a href="' . $where . '&month=' . $month_p . '&year=' . $_GET['year'] . '">' . $months[$month_p] . ' ' . $_GET['year'] . '</a>';
    }
    echo '</center>';
}
コード例 #2
0
ファイル: frontend.class.php プロジェクト: Vin985/clqweb
 private static function addTools($date, $pos)
 {
     $text = '<div class="tools flex">';
     $text .= '<form method="post" id="calendarForm" action="load.php?id=calendar"
      accept-charset="utf-8">';
     $text .= '<input type="hidden" name="action" value="" />';
     $text .= '<input type="hidden" name="date" value="' . $date->date . '" />';
     $text .= '<input type="hidden" name="pos" value="' . $pos . '" />';
     // Edit event
     $text .= '<button type="button" class="edit button-img" tabindex="0"';
     $text .= 'title="Edit event"';
     $text .= 'onclick="javascript:change_form_action($(this).closest(\'form\'), \'edit\')"';
     $text .= '</button>';
     // Remove event
     $text .= '<button type="button" class="delete button-img" tabindex="0"';
     $text .= 'title="Remove event"';
     $text .= 'onclick="javascript:jConfirm(\'';
     $text .= i18n_r('calendar/CONFIRM_DEL_EVENT');
     $text .= '\', \'Confirmation\',';
     $text .= 'function() { change_form_action($(this).closest(\'form\'), \'delete\')}.bind($(this)))"';
     $text .= '</button>';
     $text .= '</form>';
     $text .= '</div>';
     return $text;
 }
コード例 #3
0
ファイル: rates.class.php プロジェクト: Vin985/clqweb
 public function __construct()
 {
     $this->cur_lang = return_i18n_languages()[0];
     if (!$this->checkPrerequisites()) {
         throw new \Exception(i18n_r('rates/MISSING_DIR'));
     }
 }
コード例 #4
0
ファイル: calendar.class.php プロジェクト: Vin985/clqweb
 public function __construct()
 {
     $this->cur_lang = return_i18n_languages()[0];
     if (!$this->checkPrerequisites()) {
         throw new \Exception(i18n_r('calendar/MISSING_DIR'));
     }
     $this->schedule = $this->loadSchedule();
 }
コード例 #5
0
ファイル: DM_nibbler.php プロジェクト: n00dles/DM_nibbler
function DM_nibbler_init()
{
    global $nibblercode, $DM_nibbler_config_file, $thisfile_nibbler;
    $success = null;
    $error = null;
    if (isset($_POST['submit'])) {
        $nibblercode = isset($_POST['nibblercode']) ? $_POST['nibblercode'] : $nibblercode;
        if (!$error) {
            $xml = @new SimpleXMLElement('<item></item>');
            $xml->addChild('nibblercode', $nibblercode);
            if (!$xml->asXML($DM_nibbler_config_file)) {
                $error = i18n_r($thisfile_nibbler . '/NIBBLER_ERROR');
            } else {
                $x = getXML($DM_nibbler_config_file);
                $nibblercode = $x->nibblercode;
                $success = i18n_r($thisfile_nibbler . '/NIBBLER_SUCCESS');
            }
        }
    }
    //Main Navigation For Admin Panel
    ?>

	<h3 class="floated"><?php 
    echo i18n_r($thisfile_nibbler . '/NIBBLER_TITLE');
    ?>
</h3>  <br/><br/>
	<?php 
    if ($success) {
        echo '<p style="color:#669933;"><b>' . $success . '</b></p>';
    }
    if ($error) {
        echo '<p style="color:#cc0000;"><b>' . $error . '</b></p>';
    }
    ?>
	<form method="post" action="<?php 
    echo $_SERVER['REQUEST_URI'];
    ?>
">
		<p><label for="nibblercode" ><?php 
    echo i18n_r($thisfile_nibbler . '/NIBBLER_DESC');
    ?>
</label>
			<input id="nibblercode" name="nibblercode" class="text" value="<?php 
    echo $nibblercode;
    ?>
" />
		</p>
		<p><input type="submit" id="submit" class="submit" value="<?php 
    echo i18n_r($thisfile_nibbler . '/NIBBLER_SAVE');
    ?>
" name="submit" /></p>
	</form>



<?php 
}
コード例 #6
0
function jQuery_migrate_init()
{
    global $thisfile_GSJQM, $SITEURL;
    i18n_merge($thisfile_GSJQM) || i18n_merge($thisfile_GSJQM, GSDEFAULTLANG);
    # register plugin
    register_plugin($thisfile_GSJQM, i18n_r($thisfile_GSJQM . '/GSJQMigrate_TITLE'), '1.0', 'GetSimpleCMS', 'http://get-simple.info', i18n_r($thisfile_GSJQM . '/GSJQMigrate_DESC'), '', '');
    $asset = isDebug() ? 'jquery-migrate-1.2.1.js' : 'jquery-migrate-1.2.1.min.js';
    // when debug is on, migrate will output to console with deprecated notices.
    $url = $SITEURL . 'plugins/' . $thisfile_GSJQM . '/assets/js/' . $asset;
    register_script('jquerymigrate', $url, '', FALSE);
    queue_script('jquerymigrate', GSBACK);
}
コード例 #7
0
ファイル: plugin.php プロジェクト: n00dles/DM_Matrix
 public static function info($info)
 {
     $plugin = array();
     $plugin['id'] = self::FILE;
     $plugin['name'] = i18n_r(self::FILE . '/PLUGIN_TITLE');
     $plugin['version'] = self::VERSION;
     $plugin['author'] = self::AUTHOR;
     $plugin['url'] = self::URL;
     $plugin['description'] = i18n_r(self::FILE . '/PLUGIN_DESC');
     $plugin['page'] = self::FILE;
     $plugin['sidebar'] = i18n_r(self::FILE . '/PLUGIN_SIDEBAR');
     if (isset($plugin[$info])) {
         return $plugin[$info];
     } else {
         return null;
     }
 }
コード例 #8
0
ファイル: settings.php プロジェクト: hatasu/appdroid
function nm_save_settings()
{
    global $NMPAGEURL, $NMPRETTYURLS, $NMLANG, $NMSHOWEXCERPT, $NMEXCERPTLENGTH, $NMPOSTSPERPAGE, $NMRECENTPOSTS, $NMSETTING;
    $backup = array('page_url' => $NMPAGEURL, 'pretty_urls' => $NMPRETTYURLS);
    # parse $_POST
    $NMPAGEURL = $_POST['page-url'];
    $NMPRETTYURLS = isset($_POST['pretty-urls']) ? 'Y' : '';
    $NMLANG = $_POST['language'];
    $NMSHOWEXCERPT = $_POST['show-excerpt'] ? 'Y' : '';
    $NMEXCERPTLENGTH = intval($_POST['excerpt-length']);
    $NMPOSTSPERPAGE = intval($_POST['posts-per-page']);
    $NMRECENTPOSTS = intval($_POST['recent-posts']);
    # new settings since 3.0
    $NMSETTING = array();
    $NMSETTING['archivesby'] = $_POST['archivesby'];
    $NMSETTING['readmore'] = $_POST['readmore'];
    $NMSETTING['titlelink'] = $_POST['titlelink'];
    $NMSETTING['gobacklink'] = $_POST['gobacklink'];
    $NMSETTING['images'] = $_POST['images'];
    $NMSETTING['imagewidth'] = $_POST['imagewidth'];
    $NMSETTING['imageheight'] = $_POST['imageheight'];
    $NMSETTING['imagecrop'] = isset($_POST['imagecrop']);
    $NMSETTING['imagealt'] = isset($_POST['imagealt']);
    $NMSETTING['imagelink'] = isset($_POST['imagelink']);
    $NMSETTING['enablecustomsettings'] = isset($_POST['enablecustomsettings']);
    $NMSETTING['customsettings'] = get_magic_quotes_gpc() == 0 ? $_POST['customsettings'] : stripslashes($_POST['customsettings']);
    # write settings to file
    if (nm_settings_to_xml()) {
        nm_generate_sitemap();
        nm_display_message(i18n_r('news_manager/SUCCESS_SAVE'));
    } else {
        nm_display_message(i18n_r('news_manager/ERROR_SAVE'), true);
    }
    # should we update .htaccess?
    if ($NMPRETTYURLS == 'Y') {
        if ($backup['pretty_urls'] != 'Y' || $backup['page_url'] != $NMPAGEURL) {
            nm_display_message(sprintf(i18n_r('news_manager/UPDATE_HTACCESS'), 'load.php?id=news_manager&amp;htaccess'), true);
        }
    }
    # clear registered image sizes for pic.php - since 3.2
    foreach (glob(NMDATAPATH . 'images.*.txt') as $file) {
        unlink($file);
    }
}
コード例 #9
0
ファイル: sitemap.class.php プロジェクト: Vin985/clqweb
 public static function generateSitemap()
 {
     global $SITEURL;
     self::generateSitemapWithoutPing();
     if (!defined('GSDONOTPING') || !GSDONOTPING) {
         if (file_exists(GSROOTPATH . 'sitemap.xml')) {
             if (200 === ($status = pingGoogleSitemaps($SITEURL . 'sitemap.xml'))) {
                 #sitemap successfully created & pinged
                 return true;
             } else {
                 error_log(i18n_r('SITEMAP_ERRORPING'));
                 return i18n_r('SITEMAP_ERRORPING');
             }
         } else {
             error_log(i18n_r('SITEMAP_ERROR'));
             return i18n_r('SITEMAP_ERROR');
         }
     } else {
         #sitemap successfully created - did not ping
         return true;
     }
 }
コード例 #10
0
ファイル: rssAutoImporter.php プロジェクト: hatasu/appdroid
function auto_import()
{
    $Blog = new Blog();
    if ($_GET['import'] == urldecode($Blog->getSettingsData("autoimporterpass")) && $Blog->getSettingsData("autoimporter") == 'Y') {
        ini_set("memory_limit", "350M");
        define('MAGPIE_CACHE_DIR', GSCACHEPATH . 'magpierss/');
        require_once BLOGPLUGINFOLDER . 'inc/magpierss/rss_fetch.inc';
        $rss_feed_file = getXML(BLOGRSSFILE);
        foreach ($rss_feed_file->rssfeed as $the_fed) {
            $rss_uri = $the_fed->feed;
            $rss_category = $the_fed->category;
            $rss = fetch_rss($rss_uri);
            $items = array_slice($rss->items, 0);
            foreach ($items as $item) {
                $post_data['title'] = $item['title'];
                $post_data['slug'] = '';
                $post_data['date'] = $item['pubdate'];
                $post_data['private'] = '';
                $post_data['tags'] = '';
                $post_data['category'] = $rss_category;
                if ($Blog->getSettingsData('rssinclude') == 'Y') {
                    if (!empty($item['content']['encoded'])) {
                        $post_data['content'] = htmlentities($item['content']['encoded'], ENT_QUOTES, 'iso-8859-1');
                    } else {
                        $post_data['content'] = htmlentities($item['summary'], ENT_QUOTES, 'iso-8859-1') . '<p class="blog_auto_import_readmore"><a href="' . $item['link'] . '" target="_blank">' . i18n_r(BLOGFILE . '/READ_FULL_ARTICLE') . '</a></p>';
                    }
                } else {
                    $post_data['content'] = htmlentities($item['summary'], ENT_QUOTES, 'iso-8859-1') . '<p class="blog_auto_import_readmore"><a href="' . $item['link'] . '" target="_blank">' . i18n_r(BLOGFILE . '/READ_FULL_ARTICLE') . '</a></p>';
                }
                $post_data['excerpt'] = $Blog->create_excerpt($item['summary'], 0, $Blog->getSettingsData("excerptlength"));
                $post_data['thumbnail'] = auto_import_thumbnail($item);
                $post_data['current_slug'] = '';
                $post_data['author'] = htmlentities('<a href="' . $rss_uri . '">RSS Feed</a>', ENT_QUOTES, 'iso-8859-1');
                $Blog->savePost($post_data, true);
                echo '<p class="blog_rss_post_added">' . i18n_r(BLOGFILE . '/ADDED') . ': ' . $post_data['title'] . '</p>';
            }
        }
    }
}
コード例 #11
0
/**
 * check for csrfs
 * @param  string $action action to pass to check_nonce
 * @param  string $file   file to pass to check_nonce
 * @param  bool   $die    if false return instead of die
 * @return bool   returns true if csrf check fails
 */
function check_for_csrf($action, $file = "", $die = true)
{
    // check for csrf
    if (!getDef('GSNOCSRF', true)) {
        $nonce = $_REQUEST['nonce'];
        if (!check_nonce($nonce, $action, $file)) {
            exec_action('csrf');
            // @hook csrf a csrf was detected
            if (requestIsAjax()) {
                $error = i18n_r("CSRF", "CRSF Detected!");
                echo "<div>";
                // jquery bug will not parse 1 html element so we wrap it
                include 'template/error_checking.php';
                echo "</div>";
                die;
            }
            if ($die) {
                die(i18n_r("CSRF", "CRSF Detected!"));
            }
            return true;
        }
    }
}
コード例 #12
0
ファイル: sidebar-pages.php プロジェクト: kix23/GetSimpleCMS
echo find_accesskey(i18n_r('MENU_MANAGER'));
?>
" <?php 
check_menu('menu-manager');
?>
><?php 
i18n('MENU_MANAGER');
?>
</a></li>
	<?php 
exec_action("pages-sidebar");
// @hook pages-sidebar sidebar list html output
?>
</ul>

<p id="js_submit_line" ></p>

<?php 
if (get_filename_id() === 'edit') {
    ?>
	<?php 
    if (getDef('GSAUTOSAVE')) {
        ?>
	<p id="autosavestatus"><?php 
        echo sprintf(i18n_r("AUTOSAVE_STATUS"), getDef('GSAUTOSAVE'));
        ?>
</p>
	<p id="autosavenotify"></p>
	<?php 
    }
}
コード例 #13
0
ファイル: frontEndFunctions.php プロジェクト: Luigi-/gs-blog
function set_blog_title()
{
    global $title, $blogSettings, $post;
    // Declare GLOBAL variables
    $slug = base64_encode(return_page_slug());
    // What page are we on?
    if ($slug == base64_encode($blogSettings["blogurl"])) {
        // If we're on the blog page...
        if (isset($_GET['post']) && !empty($post)) {
            // If viewing a post...
            $title = (string) $post->title;
            // Set title of post
        } else {
            if (isset($_GET['archive'])) {
                // If viewing an archive...
                // Set the archive title
                $title = (string) i18n_r(BLOGFILE . '/ARCHIVE_PRETITLE') . date('F Y', strtotime($_GET['archive']));
            } else {
                if (isset($_GET['category'])) {
                    // If viewing a category...
                    $title = (string) i18n_r(BLOGFILE . '/CATEGORY_PRETITLE') . $_GET['category'];
                    // Set category title
                }
            }
        }
    }
    $title = strip_tags(strip_decode($title));
    // Clean the title variable
}
コード例 #14
0
			<h3><?php 
i18n('GETTING_STARTED');
?>
</h3>
			
			<ul>
				<li><a href="http://get-simple.info/wiki/" target="_blank" ><?php 
i18n('SIDE_DOCUMENTATION');
?>
</a></li>
				<li><a href="http://get-simple.info/forum/" target="_blank" ><?php 
i18n('SUPPORT_FORUM');
?>
</a></li>
				<li><a href="http://get-simple.info/extend/" target="_blank" ><?php 
echo str_replace(array('<em>', '</em>'), '', i18n_r('GET_PLUGINS_LINK'));
?>
</a></li>
				<li><a href="share.php?term=<?php 
i18n('SHARE');
?>
" rel="facybox" ><?php 
i18n('SHARE');
?>
 GetSimple</a></li>
			</ul>
			
			<p><?php 
i18n('WELCOME_MSG');
?>
 <?php 
コード例 #15
0
ファイル: structure.php プロジェクト: Vin985/clqweb
">&lt;</a></td>
            <td class="secondarylink"><a href="#" class="moveRight" title="<?php 
        i18n('i18n_navigation/INDENT');
        ?>
">&gt;</a></td>
            <td class="secondarylink"><a href="#" class="toggleMenu" title="<?php 
        i18n('i18n_navigation/TOGGLE_MENU');
        ?>
">M</a></td>
            <td class="secondarylink"><a href="#" class="togglePrivate" title="<?php 
        i18n('i18n_navigation/TOGGLE_PRIVATE');
        ?>
">P</a></td>
	          <td class="secondarylink">
	            <a title="<?php 
        echo i18n_r('VIEWPAGE_TITLE') . ': ' . stripslashes($page['title']);
        ?>
" target="_blank" href="<?php 
        echo $i18n_url ? find_i18n_url($page['url'], $page['parent'], $def_language) : find_url($page['url'], $page['parent']);
        ?>
">#</a>
	          </td>
           </tr>
        <?php 
        $i++;
    }
}
?>
        </tbody>
			</table>
      <input type="submit" name="save" value="<?php 
コード例 #16
0
ファイル: index.php プロジェクト: Foltys/Masopust
<?php

/**
 * Login
 *
 * Allows access to the GetSimple control panel
 *
 * @package GetSimple
 * @subpackage Login
 */
# Setup inclusions
$load['login'] = true;
$load['plugin'] = true;
include 'inc/common.php';
get_template('header', cl($SITENAME) . ' &raquo; ' . i18n_r('LOGIN'));
?>

</div>
</div>
<div class="wrapper">
<?php 
include 'template/error_checking.php';
?>
<div class="bodycontent clearfix">
	<div id="maincontent">
		<div class="main" >
			<h3><?php 
echo cl($SITENAME);
?>
</h3>
			<?php 
コード例 #17
0
ファイル: profile.php プロジェクト: CodeCharming/GetSimpleCMS
</span>			
				<input class="text" id="name" name="name" type="text" value="<?php 
echo $data->NAME;
?>
" /></p>
			</div>		
			<div class="clear"></div>		
			<div class="leftsec">
				<p><label for="timezone" ><?php 
i18n('LOCAL_TIMEZONE');
?>
:</label>
				<select class="text" id="timezone" name="timezone"> 
				<?php 
if ($data->TIMEZONE == '') {
    echo '<option value="" selected="selected" >-- ' . i18n_r('NONE') . ' --</option>';
} else {
    echo '<option selected="selected"  value="' . $data->TIMEZONE . '">' . $data->TIMEZONE . '</option>';
}
?>
				<?php 
include 'inc/timezone_options.txt';
?>
				</select>
				</p>
			</div>
			<div class="rightsec">
				<p><label for="lang" ><?php 
i18n('LANGUAGE');
?>
: <span class="right"><a href="http://get-simple.info/docs/languages" target="_blank" ><?php 
コード例 #18
0
</a></li>
	
	<?php 
exec_action('nav-tab');
?>
	
	<li id="nav_loaderimg" ><img class="toggle" id="loader" src="template/images/ajax.gif" alt="" /></li>
	<li class="rightnav" ><a class="settings first" href="settings.php" accesskey="<?php 
echo find_accesskey(i18n_r('TAB_SETTINGS'));
?>
" ><?php 
i18n('TAB_SETTINGS');
?>
</a></li>
	<li class="rightnav" ><a class="support last" href="support.php" accesskey="<?php 
echo find_accesskey(i18n_r('TAB_SUPPORT'));
?>
" ><?php 
i18n('TAB_SUPPORT');
?>
</a></li>

</ul>

</div>
</div>
	
<div class="wrapper">

	<?php 
include 'template/error_checking.php';
コード例 #19
0
ファイル: header.php プロジェクト: kix23/GetSimpleCMS
if ($GSSTYLE_wide) {
    $bodyclass .= " wide";
}
if ($SAFEMODE) {
    $bodyclass .= " safemode";
}
if (!$SAFEMODE && getDef('GSAJAXSAVE', true)) {
    $bodyclass .= " ajaxsave";
}
// ajaxsave enabled if GSAJAXSAVE and not SAFEMODE
if (get_filename_id() != 'index') {
    exec_action('admin-pre-header');
}
// @hook admin-pre-header backend before header output
if (!isset($pagetitle)) {
    $pagetitle = i18n_r(get_filename_id() . '_title');
}
$title = $pagetitle . ' &middot; ' . cl($SITENAME);
?>
<!DOCTYPE html>
<html lang="<?php 
echo get_site_lang(true);
?>
">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"  />
	<title><?php 
echo $title;
?>
</title>
	<?php 
コード例 #20
0
ファイル: ckeditor.php プロジェクト: sevenns/e-detective
<?php

if (!defined('IN_GS')) {
    die('you cannot load this page directly.');
}
global $text_area_name;
/**
 * CKEditor template
 */
$EDHEIGHT = defined('GSEDITORHEIGHT') ? GSEDITORHEIGHT . 'px' : '300px';
$EDTOOL = defined('GSEDITORTOOL') ? GSEDITORTOOL : 'basic';
$EDLANG = defined('GSEDITORLANG') ? GSEDITORLANG : i18n_r('CKEDITOR_LANG');
$EDOPTIONS = defined('GSEDITOROPTIONS') && trim(GSEDITOROPTIONS) != '' ? ', ' . GSEDITOROPTIONS : '';
if ($EDTOOL == 'advanced') {
    $TOOLBAR = "\n    ['Bold', 'Italic', 'Underline', 'NumberedList', 'BulletedList', 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock', 'Table', 'TextColor', 'BGColor', 'Link', 'Unlink', 'Image', 'RemoveFormat', 'Source'],\n    '/',\n    ['Styles','Format','Font','FontSize']\n  ";
} elseif ($EDTOOL == 'basic') {
    $TOOLBAR = "['Bold', 'Italic', 'Underline', 'NumberedList', 'BulletedList', 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock', 'Link', 'Unlink', 'Image', 'RemoveFormat', 'Source']";
} else {
    $TOOLBAR = GSEDITORTOOL;
}
global $HTMLEDITOR, $TEMPLATE, $SITEURL;
if (isset($_GET['id']) and $_GET['id'] == "user_login") {
    if (isset($HTMLEDITOR) && $HTMLEDITOR != '') {
        ?>
    <script type="text/javascript" src="template/js/ckeditor/ckeditor.js"></script>
    <script type="text/javascript">
      var editor = CKEDITOR.replace('<?php 
        echo $text_area_name;
        ?>
', {
        skin : 'getsimple',
コード例 #21
0
ファイル: upload.php プロジェクト: HelgeSverre/GetSimpleCMS
        if ($allowdelete) {
            echo '<a class="delconfirm" title="' . i18n_r('DELETE_FILE') . ': ' . htmlspecialchars($upload['name']) . '" href="deletefile.php?file=' . rawurlencode($upload['name']) . '&amp;path=' . $urlPath . '&amp;nonce=' . get_nonce("delete", "deletefile.php") . '">&times;</a>';
        }
        echo '</td></tr>';
    }
}
exec_action('file-extras');
// @hook file-extras after file list table rows
echo '</tbody></table>';
if ($counter > 0) {
    $sizedesc = '(' . fSize($totalsize) . ')';
} else {
    $sizedesc = '';
}
$totalcount = (int) $counter + (int) $foldercount;
echo '<p><em><b><span id="pg_counter">' . $totalcount . '</span></b> ' . i18n_r('TOTAL_FILES') . ' ' . $sizedesc . '</em></p>';
?>
		</div>
		</div>
	</div>
	<?php 
if ($allowupload) {
    ?>
	<div id="sidebar" >
	<?php 
    include 'template/sidebar-files.php';
    ?>
	</div>
	<?php 
}
?>
コード例 #22
0
ファイル: footer.php プロジェクト: elephantcode/elephantcode
	      	<div class="gslogo" >
		      	<a href="http://get-simple.info/" target="_blank" ><img src="template/images/getsimple_logo.gif" alt="GetSimple Content Management System" /></a>
		    </div>
	      	<div class="clear"></div>
	      	<?php 
    get_scripts_backend(TRUE);
    exec_action('footer');
}
?>

		</div><!-- end #footer -->
		<?php 
if (!isAuthPage()) {
    if (isDebug()) {
        global $GS_debug;
        echo '<h2>' . i18n_r('DEBUG_CONSOLE') . '</h2><div id="gsdebug">';
        echo '<pre>';
        foreach ($GS_debug as $log) {
            if (is_array($log)) {
                print_r($log) . '<br/>';
            } else {
                print $log . '<br/>';
            }
        }
        echo '</pre>';
        echo '</div>';
    }
}
?>
	</div><!-- end .wrapper -->
	
コード例 #23
0
ファイル: basic.php プロジェクト: kix23/GetSimpleCMS
function safemodefail($action = '', $url = '')
{
    global $SAFEMODE;
    // @todo add secfilter here to override default behavior
    if ($SAFEMODE) {
        redirect($url . "&error=" . urlencode(i18n_r('ER_SAFEMODE_DISALLOW')));
        die;
    }
}
コード例 #24
0
 * @package GetSimple
 */
?>
<ul class="snav">
<li><a href="settings.php" accesskey="<?php 
echo find_accesskey(i18n_r('SIDE_GEN_SETTINGS'));
?>
" <?php 
check_menu('settings');
?>
 ><?php 
i18n('SIDE_GEN_SETTINGS');
?>
</a></li>
<li><a href="settings.php#profile" accesskey="<?php 
echo find_accesskey(i18n_r('SIDE_USER_PROFILE'));
?>
" ><?php 
i18n('SIDE_USER_PROFILE');
?>
</a></li>
<?php 
exec_action("settings-sidebar");
?>
</ul>

<?php 
if (get_filename_id() === 'settings') {
    ?>
<p id="js_submit_line" ></p>
<?php 
コード例 #25
0
?>
" ><?php 
i18n('FILTER');
?>
</a>
				<a href="#" id="show-characters" accesskey="<?php 
echo find_accesskey(i18n_r('TOGGLE_STATUS'));
?>
" ><?php 
i18n('TOGGLE_STATUS');
?>
</a>
			</div>
			<div id="filter-search">
				<form><input type="text" autocomplete="off" class="text" id="q" placeholder="<?php 
echo strip_tags(lowercase(i18n_r('FILTER')));
?>
..." /> &nbsp; <a href="pages.php" class="cancel"><?php 
i18n('CANCEL');
?>
</a></form>
			</div>
			
			<table id="editpages" class="edittable highlight paginate">
				<tr><th><?php 
i18n('PAGE_TITLE');
?>
</th><th style="text-align:right;" ><?php 
i18n('DATE');
?>
</th><th></th><th></th></tr>
コード例 #26
0
ファイル: admin.php プロジェクト: sevenns/alpremstroy
function nm_admin_panel()
{
    global $NMPAGEURL;
    $posts = nm_get_posts(true);
    if (nm_post_files_differ($posts)) {
        nm_update_cache();
        $posts = nm_get_posts(true);
        if (nm_post_files_differ($posts)) {
            nm_display_message('<b>Warning:</b> Post files/cache mismatch', true);
        } else {
            nm_display_message('Post cache file has been updated', false);
        }
        // not translated
    }
    ?>
  <h3 class="floated"><?php 
    i18n('news_manager/PLUGIN_NAME');
    ?>
</h3>
  <div class="edit-nav clearfix">
    <a href="#" id="filter-button" ><?php 
    i18n('FILTER');
    ?>
</a>
    <a href="load.php?id=news_manager&amp;edit"><?php 
    i18n('news_manager/NEW_POST');
    ?>
</a>
    <a href="load.php?id=news_manager&amp;settings"><?php 
    i18n('news_manager/SETTINGS');
    ?>
</a>
  </div>
  <?php 
    if (!empty($posts)) {
        ?>
    <div id="filter-search">
      <form>
        <input type="text" class="text" id="tokens" placeholder="<?php 
        echo lowercase(strip_tags(i18n_r('FILTER')));
        ?>
..." />
        &nbsp;
        <a href="load.php?id=news_manager" class="cancel"><?php 
        i18n('news_manager/CANCEL');
        ?>
</a>
      </form>
    </div>
    <table id="posts" class="highlight">
    <tr>
      <th><?php 
        i18n('news_manager/POST_TITLE');
        ?>
</th>
      <th style="text-align: right;"><?php 
        i18n('news_manager/DATE');
        ?>
</th>
      <th></th>
      <th></th>
      <th></th>
    </tr>
    <?php 
        foreach ($posts as $post) {
            $title = stripslashes($post->title);
            $date = shtDate($post->date);
            $url = nm_get_url('post') . $post->slug;
            $url = nm_patch_i18n_url($url);
            ?>
      <tr>
        <td class="posttitle">
          <a href="load.php?id=news_manager&amp;edit=<?php 
            echo $post->slug;
            ?>
" title="<?php 
            i18n('news_manager/EDIT_POST');
            ?>
: <?php 
            echo $title;
            ?>
">
            <?php 
            echo $title;
            ?>
          </a>
        </td>
        <td style="text-align: right;">
          <?php 
            if (strtotime($post->date) > time()) {
                echo '<span style="color:#aaa">', $date, '</span>';
            } else {
                echo '<span>', $date, '</span>';
            }
            ?>
        </td>
        <td style="width: 20px;text-align: center;">
          <?php 
            if ($post->private == 'Y') {
                echo '<span style="color: #aaa;">P</span>';
            }
            ?>
        </td>
        <td class="secondarylink">
          <?php 
            if ($NMPAGEURL && $NMPAGEURL != '') {
                ?>
            <a href="<?php 
                echo $url;
                ?>
" target="_blank" title="<?php 
                i18n('news_manager/VIEW_POST');
                ?>
: <?php 
                echo $title;
                ?>
">
              #
            </a>
          <?php 
            }
            ?>
        </td>
        <td class="delete">
          <a href="load.php?id=news_manager&amp;delete=<?php 
            echo $post->slug;
            ?>
" class="nm_delconfirm" title="<?php 
            i18n('news_manager/DELETE_POST');
            ?>
: <?php 
            echo $title;
            ?>
?">
            &times;
          </a>
        </td>
      </tr>
      <?php 
        }
        ?>
    </table>
    <p>
      <b><?php 
        echo count($posts);
        ?>
</b>
      <?php 
        i18n('news_manager/POSTS');
        ?>
    </p>

    <script>
    $(document).ready(function() {
      // filter button opens up filter dialog
      $("#filter-button").on("click", function($e) {
        $e.preventDefault();
        $("#filter-search").slideToggle();
        $(this).toggleClass("current");
        $("#filter-search #tokens").focus();
      });
      // ignore enter key in filter form
      $("#filter-search #tokens").keydown(function($e) {
        if($e.keyCode == 13) {
          $e.preventDefault();
        }
      });
      // close filter dialog on cancel
      $("#filter-search .cancel").on("click", function($e) {
        $e.preventDefault();
        $("#posts tr").show();
        $('#filter-button').toggleClass("current");
        $("#filter-search #tokens").val("");
        $("#filter-search").slideUp();
      });
      // filter table, see:
      // http://kobikobi.wordpress.com/2008/09/15/using-jquery-to-filter-table-rows/
      $("#posts tr:has(td.posttitle)").each(function() {
        var t = $(this).find('td.posttitle').text().toLowerCase();
        $("<td class='indexColumn'></td>")
        .hide().text(t).appendTo(this);
      });
      $("#tokens").keyup(function() {
        var s = $(this).val().toLowerCase().split(" ");
      $("#posts tr:hidden").show();
      $.each(s, function(){
           $("#posts tr:visible .indexColumn:not(:contains('"
              + this + "'))").parent().hide();
        });
      });
      // confirm delete 
      $('.nm_delconfirm').on('click', function () {
        return confirm($(this).attr("title"));
      });
    });
    </script>

    <?php 
    }
}
コード例 #27
0
ファイル: theme.php プロジェクト: promil23/GetSimpleCMS
		<p><select id="theme_select" class="text" style="width:250px;" name="template" >
				<?php 
echo $theme_options;
?>
			</select>&nbsp;&nbsp;&nbsp;<input class="submit" type="submit" name="submitted" value="<?php 
i18n('ACTIVATE_THEME');
?>
" /></p>
		</form>
		<?php 
if (file_exists(GSTHEMESPATH . $TEMPLATE . '/images/screenshot.png')) {
    echo '<p><img id="theme_preview" style="border:2px solid #333;" src="../' . $theme_path . $TEMPLATE . '/images/screenshot.png" alt="' . i18n_r('THEME_SCREENSHOT') . '" /></p>';
    echo '<span id="theme_no_img" style="visibility:hidden"><p><em>' . i18n_r('NO_THEME_SCREENSHOT') . '</em></p></span>';
} else {
    echo '<p><img id="theme_preview" style="visiblity:hidden;border:2px solid #333;" src="../' . $theme_path . $TEMPLATE . '/images/screenshot.png" alt="' . i18n_r('THEME_SCREENSHOT') . '" /></p>';
    echo '<span id="theme_no_img"><p><em>' . i18n_r('NO_THEME_SCREENSHOT') . '</em></p></span>';
}
exec_action('theme-extras');
?>
			
		</div>
	
	</div>
	
	<div id="sidebar" >
		<?php 
include 'template/sidebar-theme.php';
?>
	</div>

</div>
コード例 #28
0
ファイル: log.php プロジェクト: Foltys/Masopust
 echo '<li><p style="font-size:11px;line-height:15px;" ><b style="line-height:20px;" >' . i18n_r('LOG_FILE_ENTRY') . '</b><br />';
 foreach ($log->children() as $child) {
     $name = $child->getName();
     echo '<b>' . stripslashes(ucwords($name)) . '</b>: ';
     $d = $log->{$name};
     $n = lowercase($child->getName());
     $ip_regex = '/^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:[.](?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$/';
     $url_regex = @"((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\\w\\d:#@%/;\$()~_?\\+-=\\\\.&]*)";
     //check if its an url address
     if (do_reg($d, $url_regex)) {
         $d = '<a href="' . $d . '" target="_blank" >' . $d . '</a>';
     }
     //check if its an ip address
     if (do_reg($d, $ip_regex)) {
         if ($d == $_SERVER['REMOTE_ADDR']) {
             $d = i18n_r('THIS_COMPUTER') . ' (<a href="' . $whois_url . $d . '" target="_blank" >' . $d . '</a>)';
         } else {
             $d = '<a href="' . $whois_url . $d . '" target="_blank" >' . $d . '</a>';
         }
     }
     //check if its an email address
     if (check_email_address($d)) {
         $d = '<a href="mailto:' . $d . '">' . $d . '</a>';
     }
     //check if its a date
     if ($n === 'date') {
         $d = lngDate($d);
     }
     echo stripslashes($d);
     echo ' <br />';
 }
コード例 #29
0
}
if ($err != '') {
    echo '<div class="error">' . $err . '</div>';
}
if ($random != '') {
    echo '<div class="updated">' . i18n_r('NOTE_USERNAME') . ' <b>' . stripslashes($_POST['user']) . '</b> ' . i18n_r('NOTE_PASSWORD') . ' <b>' . $random . '</b> &nbsp&raquo;&nbsp; <a href="support.php">' . i18n_r('EMAIL_LOGIN') . '</a></div>';
    $_POST = null;
}
?>
		
<?php 
if ($kill == '') {
    ?>
		<div class="main" >
			<h3><?php 
    echo $site_full_name . ' ' . i18n_r('INSTALLATION');
    ?>
</h3>
			<form action="<?php 
    myself();
    ?>
" method="post" accept-charset="utf-8" >
				<input name="siteurl" type="hidden" value="<?php 
    echo $fullpath;
    ?>
" />
				<input name="lang" type="hidden" value="<?php 
    echo $LANG;
    ?>
" />
				<p><label for="sitename" ><?php 
コード例 #30
0
 } else {
     if ($_POST['post-title']) {
         $url = $_POST['post-title'];
         if (isset($i18n['TRANSLITERATION']) && is_array($translit = $i18n['TRANSLITERATION']) && count($translit > 0)) {
             $url = str_replace(array_keys($translit), array_values($translit), $url);
         }
         $url = to7bit($url, "UTF-8");
         $url = clean_url($url);
         //old way
     } else {
         $url = "temp";
     }
 }
 //check again to see if the URL is empty
 if (trim($url) == '') {
     redirect("edit.php?upd=edit-err&type=" . urlencode(i18n_r('CANNOT_SAVE_EMPTY')));
 }
 // was the slug changed on an existing page?
 if (isset($_POST['existing-url'])) {
     if ($_POST['post-id'] != $_POST['existing-url']) {
         // dont change the index page's slug
         if ($_POST['existing-url'] == 'index') {
             $url = $_POST['existing-url'];
             redirect("edit.php?id=" . urlencode($_POST['existing-url']) . "&upd=edit-index&type=edit");
         } else {
             exec_action('changedata-updateslug');
             updateSlugs($_POST['existing-url']);
             $file = GSDATAPAGESPATH . $url . ".xml";
             $existing = GSDATAPAGESPATH . $_POST['existing-url'] . ".xml";
             $bakfile = GSBACKUPSPATH . "pages/" . $_POST['existing-url'] . ".bak.xml";
             copy($existing, $bakfile);