Example #1
0
 function __construct()
 {
     //include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_stats.php');
     //e107::lan('forum','front');
     e107::lan('forum', "front", true);
     e107::css('forum', 'forum.css');
 }
Example #2
0
    function init()
    {
        if (E107_DEBUG_LEVEL > 0) {
            $this->adminMenu['ranks/list'] = array('caption' => LAN_USER_RANKS . " (experimental)", 'perm' => '4|U3');
        }
        $JS = <<<JS

\t\t\t//\t\$('#user-action-indicator-'+user).html('<i class="fa fa-cog"></i>'); //

\t\t\t\$(document).on('click', ".user-action", function(e){
\t\t\t\t// e.stopPropagation();

\t\t\t\tvar action = \$(this).attr('data-action-type');
\t\t\t\tvar user = \$(this).attr('data-action-user');

\t\t\t//\t\$('#user-action-indicator-'+user).html('<i class="fa fa-spin fa-spinner"></i>'); //

\t\t\t\t\$('.user-action-hidden').val(''); // clear all, incase of back-button or auto-fill.
\t\t\t\t\$('#user-action-'+ user).val(action);
\t\t\t\t\$('#core-user-list-form').submit();


\t\t\t\t});
JS;
        e107::js('footer-inline', $JS);
        e107::css('inline', '
			.user-action { cursor: pointer }
			.btn-user-action { margin-right:15px}

		');
    }
Example #3
0
function loadJSAddons()
{
    if (e_PAGE == 'menus.php' && vartrue($_GET['configure'])) {
        return;
    }
    // e107::js('core',    'bootstrap/js/bootstrap-modal.js', 'jquery', 2);  // Special Version see: https://github.com/twitter/bootstrap/pull/4224
    e107::css('core', 'bootstrap-select/bootstrap-select.min.css', 'jquery');
    e107::js('core', 'bootstrap-select/bootstrap-select.min.js', 'jquery', 2);
    e107::css('core', 'bootstrap-multiselect/css/bootstrap-multiselect.css', 'jquery');
    e107::js('core', 'bootstrap-multiselect/js/bootstrap-multiselect.js', 'jquery', 2);
    // TODO: remove typeahead.
    e107::js('core', 'bootstrap-jasny/js/jasny-bootstrap.js', 'jquery', 2);
    e107::css('core', 'bootstrap-datetimepicker/css/datetimepicker.css', 'jquery');
    e107::js('core', 'bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js', 'jquery', 2);
    e107::js('core', 'jquery.h5validate.min.js', 'jquery', 2);
    e107::js('core', 'jquery.elastic.js', 'jquery', 2);
    e107::js('core', 'jquery.at.caret.min.js', 'jquery', 2);
    // e107::js('core', 	'jquery-ui-timepicker-addon.js', 'jquery', 2);
    //e107::css('core', 	'chosen/chosen.css', 'jquery');
    //e107::js('core', 	'chosen/chosen.jquery.min.js', 'jquery', 2);
    // e107::js('core', 	'password/jquery.pwdMeter.js', 'jquery', 2); // loaded in form-handler.
    // e107::css('core', 	'bootstrap-tag/bootstrap-tag.css', 'jquery');
    //	e107::js('core', 	'bootstrap-tag/bootstrap-tag.js', 'jquery', 2);
    //	e107::js("core",	"tags/jquery.tagit.js","jquery",3);
    //	e107::css('core', 	'tags/jquery.tagit.css', 'jquery');
    e107::css('core', 'core/admin.jquery.css', 'jquery');
    e107::js("core", "core/admin.jquery.js", "jquery", 4);
    // Load all default functions.
    e107::css('core', 'core/all.jquery.css', 'jquery');
    e107::js("core", "core/all.jquery.js", "jquery", 4);
    // Load all default functions.
}
Example #4
0
    public function init()
    {
        e107::plugLan('gallery', 'front');
        e107::js('gallery', 'jslib/prettyPhoto/js/jquery.prettyPhoto.js', 'jquery');
        e107::css('gallery', 'jslib/prettyPhoto/css/prettyPhoto.css', 'jquery');
        e107::css('gallery', 'gallery_style.css');
        $prettyPhoto = <<<JS
\$(document).ready(function(){
    \$("a[data-gal^='prettyPhoto']").prettyPhoto(
\t    {
\t    \thook: 'data-gal',
\t    \ttheme: 'pp_default',
\t    \toverlay_gallery: false,
\t    \tdeeplinking: false
\t    }
    );
  });
JS;
        e107::js('footer-inline', $prettyPhoto, 'jquery');
        $this->catList = e107::getMedia()->getCategories('gallery');
    }
Example #5
0
function loadJSAddons()
{
    if (e_PAGE == 'menus.php' && vartrue($_GET['configure'])) {
        return;
    }
    // e107::js('core',    'bootstrap/js/bootstrap-modal.js', 'jquery', 2);  // Special Version see: https://github.com/twitter/bootstrap/pull/4224
    e107::css('core', 'bootstrap-editable/css/bootstrap-editable.css', 'jquery');
    e107::js('core', 'bootstrap-editable/js/bootstrap-editable.min.js', 'jquery', 2);
    //	e107::css('url', 		"//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap-editable/css/bootstrap-editable.css");
    //	e107::js('url', 		"//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap-editable/js/bootstrap-editable.min.js");
    e107::css('core', 'bootstrap-select/bootstrap-select.min.css', 'jquery');
    e107::js('core', 'bootstrap-select/bootstrap-select.min.js', 'jquery', 2);
    e107::css('core', 'bootstrap-multiselect/css/bootstrap-multiselect.css', 'jquery');
    e107::js('core', 'bootstrap-multiselect/js/bootstrap-multiselect.js', 'jquery', 2);
    // TODO: remove typeahead.
    e107::js('core', 'bootstrap-jasny/js/jasny-bootstrap.js', 'jquery', 2);
    e107::css('core', 'bootstrap-datetimepicker/css/datetimepicker.css', 'jquery');
    e107::js('core', 'bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js', 'jquery', 2);
    e107::js('core', 'jquery.h5validate.min.js', 'jquery', 2);
    if (e_LAN != 'en') {
        e107::js('inline', buildDateLocale(), 'jquery', 2);
    }
    e107::js('core', 'jquery.elastic.js', 'jquery', 2);
    e107::js('core', 'jquery.at.caret.min.js', 'jquery', 2);
    // e107::js('core', 	'jquery-ui-timepicker-addon.js', 'jquery', 2);
    //e107::css('core', 	'chosen/chosen.css', 'jquery');
    //e107::js('core', 	'chosen/chosen.jquery.min.js', 'jquery', 2);
    e107::js('core', 'password/jquery.pwdMeter.js', 'jquery', 2);
    // e107::css('core', 	'bootstrap-tag/bootstrap-tag.css', 'jquery');
    e107::js('core', 'bootstrap-tag/bootstrap-tag.js', 'jquery', 2);
    //	e107::js("core",	"tags/jquery.tagit.js","jquery",3);
    //	e107::css('core', 	'tags/jquery.tagit.css', 'jquery');
    e107::css('core', 'core/admin.jquery.css', 'jquery');
    e107::js("core", "core/admin.jquery.js", "jquery", 4);
    // Load all default functions.
    e107::css('core', 'core/all.jquery.css', 'jquery');
    e107::js("core", "core/all.jquery.js", "jquery", 4);
    // Load all default functions.
}
Example #6
0
    public function customPage()
    {
        // TODO: Utilize the URL instead of the local file.
        // First, I have to figure out why it won't load!
        e107::js('forecasty', 'assets/googlemaps.js', 'jquery');
        //		e107::js('url', 'http://maps.googleapis.com/maps/api/js?sensor=false');
        e107::js('forecasty', 'assets/jquery-gmaps-latlon-picker.js', 'jquery');
        e107::css('forecasty', 'assets/jquery-gmaps-latlon-picker.css');
        $text = '
		The below accepts many different formats of locations:
		<ul>
			<li>Zip Codes</li>
			<li>City, State</li>
			<li>City, Country</li>
			<li>State</li>
			<li>.. etc.</li>
		</ul>

		You can also fine tune your location by dragging and double clicking the map.
		<br /><br />
		<fieldset class="gllpLatlonPicker">
			<input type="text" class="gllpSearchField">
			<input type="button" class="gllpSearchButton" value="Search">
			<div class="gllpMap">Google Maps</div>
			Latitude: <input type="text" class="gllpLatitude" value="-76.61483160837915">
			<br />
			Longitude: <input type="text" class="gllpLongitude" value="19.218757152557373">
			<input type="hidden" class="gllpZoom" value="3">
		</fieldset>
		<br /><br />
		For your Fallback Location you need Latitude,Longitude in that exact format.<br /><br />

		This page will be updated to work, flow, and look better in the future.
		';
        return $text;
    }
Example #7
0
 *
 *
 *
 * $Source: /cvs_backup/e107_0.8/e107_admin/theme.php,v $
 * $Revision$
 * $Date$
 * $Author$
 */
require_once "../class2.php";
if (!getperms("1")) {
    header("location:" . e_BASE . "index.php");
    exit;
}
include_lan(e_LANGUAGEDIR . e_LANGUAGE . '/admin/lan_' . e_PAGE);
$e_sub_cat = 'theme_manage';
e107::css("inline", "\n.hide\t\t\t\t\t\t{ display: none }\n.admin-theme-thumb\t\t\t{ height:130px;overflow:hidden;border:1px solid black;margin-bottom:10px   }\n.admin-theme-thumb:hover\t{ opacity:0.4 }\n\n.admin-theme-options\t\t{ transition: opacity .20s ease-in-out;\n\t\t\t\t\t\t\t -moz-transition: opacity .20s ease-in-out;\n\t\t\t\t\t\t\t -webkit-transition: opacity .20s ease-in-out;\n\t\t\t\t\t\t\t opacity:0; \n\t\t\t\t\t\t\t width:100%;\n\t\t\t\t\t\t\t height:80px;\n\t\t\t\t\t\t\t padding-top:50px;\n\t\t\t\t\t\t\t white-space:nowrap;\n\t\t\t\t\t\t\t background-color:black;\n\t\t\t\t\t\t\t display:block;position:relative; text-align:center; vertical-align:middle; top:-141px;}\n\n.admin-theme-options:hover\t{ opacity:0.8; }\n\n.admin-theme-title\t\t\t{ font-size: 15px; overflow:hidden; padding-left:5px; white-space:no-wrap; width:200px; position:relative; top:-132px; }\n\n.admin-theme-select\t\t\t{border:1px dotted silver;background-color:#DDDDDD;float:left }\n\n.admin-theme-select-active\t{ background-color:red;float:left }\n\n.admin-theme-cell\t\t\t{ width:202px; height:160px; padding:10px; -moz-border-radius: 5px; border-radius: 5px; margin:5px}\n\n.admin-theme-cell-default   { border:1px dotted silver; background-color:#DDDDDD }\n\n\n\n.admin-theme-cell-site\t\t{ background-color: #d9edf7;  border: 1px solid #bce8f1; }\n\n.admin-theme-cell-admin\t \t{ background-color:#FFFFD5; border: 1px solid #FFCC00; }\n\n\n");
require_once e_HANDLER . "theme_handler.php";
$themec = new themeHandler();
if (e_AJAX_REQUEST) {
    define('e_IFRAME', true);
}
if (e_AJAX_REQUEST) {
    $data = $themec->getThemeInfo('jayya');
    echo $themec->renderThemeInfo($data);
    exit;
} else {
    require_once "auth.php";
    echo '

		 <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			    <div class="modal-header">
Example #8
0
    /**
     * Carousel Item Browser. 
     * @param array|string $data - array for items or string for an error alert.
     * @param array $parm
     * @return string
     */
    function browserCarousel($data, $parm = null)
    {
        /* Fix for Bootstrap2 margin-left issue when wrapping */
        e107::css('inline', '
				
		.media-carousel { margin-bottom:15px }
		
		.row-fluid .media-carousel.span6:nth-child(2n + 3) { margin-left : 0px; }
		.row-fluid .media-carousel.span4:nth-child(3n + 4) { margin-left : 0px; }
		.row-fluid .media-carousel.span3:nth-child(4n + 5) { margin-left : 0px; }
		.row-fluid .media-carousel.span2:nth-child(6n + 7) { margin-left : 0px; }
		');
        $frm = e107::getForm();
        //	$text .= print_a($_GET,true);
        $data_src = $this->mediaSelectNav($category, $parm['tagid'], $parm);
        $carouselID = 'myCarousel-' . $parm['action'];
        $searchToolttip = empty($parm['searchTooltip']) ? "Enter some text to filter results" : $parm['searchTooltip'];
        //$text = "<form class='form-search' action='".e_SELF."?".e_QUERY."' id='core-plugin-list-form' method='get'>";
        if (!e_AJAX_REQUEST) {
            $searchPlaceholder = varset($parm['searchPlaceholder'], LAN_SEARCH);
            $text = '<div class="btn-group"><span class="input-append form-inline">';
            $text .= "<input type='text' class='e-ajax-keyup input-xxlarge ' placeholder= '" . $searchPlaceholder . "...' title=\"" . $searchToolttip . "\" name='search' value=''  data-target='media-browser-container-" . $parm['action'] . "' data-src='" . $data_src . "' />";
            //		$text .= "<span class='field-help'>bablalal</span>";
            //	$text .= '<button class="btn btn-primary" name="'.$submitName.'" type="submit">'.LAN_GO.'</button>';
            $text .= '<a class="btn btn-primary" href="#' . $carouselID . '" data-slide="prev">&lsaquo;</a><a class="btn btn-primary" href="#' . $carouselID . '" data-slide="next">&rsaquo;</a>';
            $text .= "</span>";
            $text .= "</div>";
            $text .= "<div id='media-browser-container-" . $parm['action'] . "' class='form-inline clearfix row-fluid'>";
        }
        //	$text .= $this->search('srch', $srch, 'go', $filterName, $filterArray, $filterVal).$frm->hidden('mode','online');
        $text .= '<div id="' . $carouselID . '"  class="carousel slide" data-interval="false">';
        $text .= '{INDICATORS}';
        $text .= '<div style="margin-top:10px" class="carousel-inner">';
        //	$text .= "<div class='item active'>";
        $perPage = vartrue($parm['perPage'], 12);
        $c = 0;
        $slides = array();
        if (is_array($data) && count($data) > 0) {
            foreach ($data as $key => $val) {
                if ($c == 0) {
                    $active = count($slides) < 1 ? ' active' : '';
                    $text .= '

							<!-- Start Slide -->
							<div class="item' . $active . '">';
                    if (vartrue($val['slideCaption'])) {
                        $text .= "<h4>" . $val['slideCaption'] . "</h4>";
                    }
                }
                $val['width'] = $parm['width'];
                $val['height'] = $parm['height'];
                $val['id'] = $parm['id'];
                $val['tagid'] = $parm['tagid'];
                $val['type'] = $parm['type'];
                $val['bbcode'] = $parm['bbcode'];
                $val['gridClass'] = $parm['gridClass'];
                $text .= $this->browserCarouselItem($val);
                $c++;
                if (varset($val['slideCategory']) && isset($prevCat)) {
                    if ($val['slideCategory'] !== $prevCat) {
                        $c = $perPage;
                    }
                    $prevCat = $val['slideCategory'];
                }
                if ($c == $perPage) {
                    $text .= '
							</div>
							<!-- End Slide -->

							';
                    $slides[] = 1;
                    $c = 0;
                }
            }
        } elseif (is_string($data)) {
            $text .= "<div style='line-height: 1.5;'>" . $data . "</div>";
        } else {
            $text .= "<div class='alert alert-info alert-block text-center'>No Results Found.</div>";
        }
        $text .= $c != 0 ? "</div>\n<!-- End Slide -->\n" : "";
        $text .= "</div>";
        $text .= "\n<!-- End Carousel -->\n<div class='clearfix'>&nbsp;</div>\n\n";
        if (!e_AJAX_REQUEST) {
            $text .= "</div></div>";
        }
        $ret = str_replace('{INDICATORS}', $this->browserIndicators($slides, $carouselID), $text);
        if (E107_DEBUG_LEVEL > 0) {
            //		print_a($parm);
        }
        return $ret;
    }
Example #9
0
 /**
  * Include necessary CSS and JS files
  */
 function include_components()
 {
     e107::css('nodejs_online', 'css/nodejs_online.css');
     e107::js('footer', '{e_PLUGIN}nodejs_online/js/nodejs_online.js', 'jquery', 5);
 }
Example #10
0
 *
 * @package     e107
 * @subpackage	frontend
 * @version     $Id: cron.php 12492 2011-12-30 16:09:10Z e107steved $
 *	Ultra-simple Image-Gallery
 */
require_once "../../class2.php";
if (!e107::isInstalled('gallery')) {
    header('location:' . e_BASE . 'index.php');
    exit;
}
e107::js('gallery', 'jslib/prettyPhoto/js/jquery.prettyPhoto.js', 'jquery');
e107::css('gallery', 'jslib/prettyPhoto/css/prettyPhoto.css', 'jquery');
e107::css('gallery', 'gallery_style.css');
// Work-around for indent issue. see: https://github.com/twitter/bootstrap/issues/4890
e107::css('inline', "\r\n/* Gallery CSS */\r\n.thumbnails .span2:nth-child(6n+1) {\r\nmargin-left:0;\r\n}", 'jquery');
$prettyPhoto = <<<JS
\$(document).ready(function(){
    \$("a[data-gal^='prettyPhoto']").prettyPhoto(
\t    {
\t    \thook: 'data-gal',
\t    \ttheme: 'pp_default', /* pp_default , light_rounded , dark_rounded , light_square , dark_square ,facebook */
\t    \toverlay_gallery: false,
\t    \tdeeplinking: false
\t    }
    );
  });
JS;
e107::js('inline', $prettyPhoto, 'jquery');
require_once HEADERF;
class gallery
Example #11
0
    /**
     *	Date field with popup calendar // NEW in 0.8/2.0
     *
     * @param string $name the name of the field
     * @param integer $datestamp UNIX timestamp - default value of the field
     * @param array or str 
     * @example $frm->datepicker('my_field',time(),'type=date');
     * @example $frm->datepicker('my_field',time(),'type=datetime&inline=1');
     * @example $frm->datepicker('my_field',time(),'type=date&format=yyyy-mm-dd');
     * @example $frm->datepicker('my_field',time(),'type=datetime&format=MM, dd, yyyy hh:ii');
     * 
     * @url http://trentrichardson.com/examples/timepicker/
     */
    function datepicker($name, $datestamp = false, $options = null)
    {
        if (vartrue($options) && is_string($options)) {
            parse_str($options, $options);
        }
        $type = varset($options['type']) ? trim($options['type']) : "date";
        // OR  'datetime'
        $dateFormat = varset($options['format']) ? trim($options['format']) : e107::getPref('inputdate', '%Y-%m-%d');
        $ampm = preg_match("/%l|%I|%p|%P/", $dateFormat) ? 'true' : 'false';
        $value = null;
        if ($type == 'datetime' && !varset($options['format'])) {
            $dateFormat .= " " . e107::getPref('inputtime', '%H:%M:%S');
        }
        $dformat = e107::getDate()->toMask($dateFormat);
        $id = $this->name2id($name);
        $classes = array('date' => 'e-date', 'datetime' => 'e-datetime');
        if ($datestamp) {
            $value = is_numeric($datestamp) ? e107::getDate()->convert_date($datestamp, $dateFormat) : $datestamp;
            //date("d/m/Y H:i:s", $datestamp);
        }
        $text = "";
        //	$text .= 'dformat='.$dformat.'  defdisp='.$dateFormat;
        $class = isset($classes[$type]) ? $classes[$type] : "tbox e-date";
        $size = vartrue($options['size']) ? intval($options['size']) : 40;
        $required = vartrue($options['required']) ? "required" : "";
        $firstDay = vartrue($options['firstDay']) ? $options['firstDay'] : 0;
        $xsize = vartrue($options['size']) && !is_numeric($options['size']) ? $options['size'] : 'xlarge';
        if (vartrue($options['inline'])) {
            $text .= "<div class='{$class}' id='inline-{$id}' data-date-format='{$dformat}'  data-date-ampm='{$ampm}' data-date-firstday='{$firstDay}' ></div>\r\n\t\t\t\t<input  type='hidden' name='{$name}' id='{$id}' value='{$value}' data-date-format='{$dformat}'  data-date-ampm='{$ampm}' data-date-firstday='{$firstDay}' />\r\n\t\t\t";
        } else {
            $text .= "<input class='{$class} input-" . $xsize . " form-control' type='text' size='{$size}' name='{$name}' id='{$id}' value='{$value}' data-date-format='{$dformat}' data-date-ampm='{$ampm}'  data-date-language='" . e_LAN . "' data-date-firstday='{$firstDay}' {$required} />";
        }
        //	$text .= "ValueFormat: ".$dateFormat."  Value: ".$value;
        //	$text .= " ({$dformat}) type:".$dateFormat." ".$value;
        // Load it in the footer.
        e107::css('core', 'bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css', 'jquery');
        e107::js('core', 'bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js', 'jquery', 2);
        if (e_LANGUAGE !== 'English') {
            e107::js('footer-inline', e107::getDate()->buildDateLocale());
        }
        e107::js('footer-inline', '
			$("input.e-date").each(function() {
        		$(this).datetimepicker({
        			minView: "month",
        			maxView: "decade",
        			autoclose: true,
        			format: $(this).attr("data-date-format"),
        			weekStart: $(this).attr("data-date-firstday"),
        			language: $(this).attr("data-date-language")
        		 });
    		});

    		$("input.e-datetime").each(function() {
        		$(this).datetimepicker({
        			autoclose: true,
        			format: $(this).attr("data-date-format"),
        			weekStart: $(this).attr("data-date-firstday"),
        			showMeridian: $(this).attr("data-date-ampm"),
        			language: $(this).attr("data-date-language")
        		 });
    		});
    		');
        return $text;
    }
Example #12
0
File: theme.php Project: gitye/e107
<?php

/**
 * Bootstrap 3 Theme for e107 v2.x
 */
if (!defined('e107_INIT')) {
    exit;
}
define("BOOTSTRAP", 3);
define("FONTAWESOME", 4);
define('VIEWPORT', "width=device-width, initial-scale=1.0");
e107::js("url", "http://netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js");
e107::css('url', 'http://netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css');
e107::css('url', "http://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
e107::js("footer-inline", "\$('.e-tip').tooltip({container: 'body'})");
// activate bootstrap tooltips.
define('OTHERNEWS_COLS', false);
// no tables, only divs.
define('OTHERNEWS_LIMIT', 3);
// Limit to 3.
define('OTHERNEWS2_COLS', false);
// no tables, only divs.
define('OTHERNEWS2_LIMIT', 3);
// Limit to 3.
define('COMMENTLINK', e107::getParser()->toGlyph('fa-comment'));
define('COMMENTOFFSTRING', '');
define('PRE_EXTENDEDSTRING', '<br />');
/**
 * @param string $caption
 * @param string $text
 * @param string $id : id of the current render
Example #13
0
if (!defined('USER_AREA')) {
    //overload is now possible, prevent warnings
    define('USER_AREA', TRUE);
}
define('ADMIN_AREA', FALSE);
$e107 = e107::getInstance();
$sql = e107::getDb();
$sql->db_Mark_Time('(Header Top)');
e107::js('core', 'bootstrap/js/bootstrap-tooltip.js', 'jquery');
e107::css('core', 'bootstrap/css/tooltip.css', 'jquery');
e107::js('core', 'bootstrap-notify/js/bootstrap-notify.js', 'jquery');
e107::css('core', 'bootstrap-notify/css/bootstrap-notify.css', 'jquery');
// ------------------
// e107::js('core', 	'jquery.elastic.js', 'jquery', 2);
e107::js('core', 'rate/js/jquery.raty.js', 'jquery', 2);
e107::css('core', 'core/all.jquery.css', 'jquery');
e107::js("core", "core/front.jquery.js", "jquery", 5);
// Load all default functions.
e107::js("core", "core/all.jquery.js", "jquery", 5);
// Load all default functions.
$js_body_onload = array();
// Legacy array of code to load with page.
//
// *** Code sequence for headers ***
// IMPORTANT: These items are in a carefully constructed order. DO NOT REARRANGE
// without checking with experienced devs! Various subtle things WILL break.
//
// We realize this is a bit (!) of a mess and hope to make further cleanups in a future release.
//
// A: Define themable header parsing
// B: Send HTTP headers that come before any html
Example #14
0
<?php

define("e_ADMIN_AREA", true);
require_once "../../../../class2.php";
//e107::lan('core','admin',TRUE);
define("e_IFRAME", true);
//require_once(e_ADMIN."auth.php");
if (!USER || check_class($pref['post_html']) == FALSE) {
    exit;
}
e107::css('inline', "\n\n\t.selectEmote \t\t{ display:inline-block; cursor:pointer;margin:3px }\n\tbody\t\t\t\t{ text-align:center }\n\t.area\t\t\t\t{  \n\t\t\t\t\t \t  margin-top:-1px; padding:20px; \n\t\t\t\t\t\t}\n\tspan.badge\t\t\t{ cursor: pointer }\n\tspan.label\t\t\t{ cursor: pointer }\n\tul.glyphicons\t\t{ list-style:none; margin-left:0px; font-size:120%}\n\tul.glyphicons  li\t{ float:left;  cursor:pointer; width:190px; padding:5px; }\n\ta, li\t\t\t\t\t{  outline: 0; }    \n\n");
e107::js('tinymce4', 'plugins/compat3x/tiny_mce_popup.js');
e107::js('inline', "\n\n\$(document).ready(function()\n{\n\t\t\$('#insertButton').click(function () {\n\t\t\t\t\t\t\n\t\t\tvar buttonType = \$('input:radio[name=buttonType]:checked').val();\n\t\t\tvar buttonSize = \$('input:radio[name=buttonSize]:checked').val();\n\t\t\t\t\t\n\t\t\tvar buttonText = \$('#buttonText').val();\n\t\t\tvar buttonUrl = \$('#buttonUrl').val();\n\t\t\t\n\t\t\tvar buttonClass = (buttonType != '') ? 'btn-'+buttonType : '';\n\t\t\t\t\t\n\n\t\t\tvar html = '<a class=\"btn ' + buttonClass + ' ' + buttonSize + '\" href=\"' + buttonUrl + '\" >' + buttonText + '</a>  ';\n\t\t//\talert(html);\t\t\n\t\t\ttinyMCEPopup.editor.execCommand('mceInsertContent', false, html);\n\t\t\ttinyMCEPopup.close();\n\t\t});\n\t\t\n\t\t\n\t\t\$('span.label, span.badge').click(function () {\n                var cls = \$(this).attr('class');\n                var html = '<span class=\"' + cls + '\">' + \$(this).text() + '</span>&nbsp;';\n\t\t\t\ttinyMCEPopup.editor.execCommand('mceInsertContent', false, html);\n\t\t\t\ttinyMCEPopup.close();\n\t\t});\n\t\t\n\t\n\t\t\$('ul.glyphicons li, #glyph-save').click(function () {\n\t\t\n\t\t\t\tvar color = \$('#glyph-color').val();\t\n\t\t\t\tvar custom = \$('#glyph-custom').val();\t\t\t\n                var cls = (custom != '') ? custom : \$(this).find('i').attr('class');\t\n\t\n                var html = '<i class=\"' + cls + '\"></i>&nbsp;';\n\t\t\t\t\n\t\t\t//\talert(html);\n\t\t\t\ttinyMCEPopup.editor.execCommand('mceInsertContent', false, html);\n\t\t\t\ttinyMCEPopup.close();\n\t\t});\n\t\n\t\t\$('#bbcodeInsert').click(function () \n\t\t{\n\t\t\t\ts = \$('#bbcodeValue').val();\n\t\t\t\ts = s.trim(s);\n\t\n\t\t\t\tvar html = \$.ajax({\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\turl: './parser.php',\n\t\t\t\t\tdata: { content: s, mode: 'tohtml' },\n\t\t\t\t\tasync       : false,\n\n\t\t\t\t\tdataType: 'html',\n\t\t\t\t\tsuccess: function(html) {\n\t\t\t\t      return html;\n\t\t\t\t    }\n\t\t\t\t}).responseText;\n\n\t\t\t\thtml = '<bbcode alt=\"'+encodeURIComponent(s)+'\">' + html + '</bbcode>   ' ;\nalert(html);\n\t\t\t\ttinyMCEPopup.editor.execCommand('mceInsertContent', false, html);\n\t\t\t\ttinyMCEPopup.close();\n\t\t});\n\t\n\t\t\$('a.bbcodeSelect').click(function () {\n\t\t\tvar html = \$(this).html();\t\n\t\t\t\$('#bbcodeValue').val(html);\n\t\t});\n\t\t\n\t\t\$('#e-cancel').click(function () {\n\t\t\t\t\t\n\t\t\ttinyMCEPopup.close();\n\t\t});\n\t\t\n});\n\n\n", 'jquery');
class e_bootstrap
{
    private $styleClasses = array('' => 'Default', 'primary' => "Primary", 'success' => "Success", 'info' => "Info", 'warning' => "Warning", 'danger' => "Danger", 'inverse' => "Inverse");
    function init()
    {
        $ns = e107::getRender();
        if (e_QUERY == 'bbcode') {
            echo $this->bbcodeForm();
            return;
        }
        $text = "<div class='alert alert-warning'>Warning: These will only work if you have a bootstrap-based theme installed</div>";
        $text .= '
		<ul class="nav nav-tabs">';
        $text .= '<li class="active" ><a href="#mbuttons" data-toggle="tab">Buttons</a></li>';
        $text .= '<li><a href="#badges" data-toggle="tab">Labels &amp; Badges</a></li>';
        $text .= '<li><a href="#glyphs" data-toggle="tab">Glyphicons</a></li>';
        $text .= '</ul>';
        $text .= '<div class="tab-content">';
Example #15
0
*/
if (!defined('e107_INIT')) {
    require_once '../../class2.php';
}
define('NAVIGATION_ACTIVE', 'forum');
// ??
$e107 = e107::getInstance();
$tp = e107::getParser();
$ns = e107::getRender();
$mes = e107::getMessage();
if (!$e107->isInstalled('forum')) {
    header('Location: ' . SITEURL . 'index.php');
    exit;
}
e107::lan('forum', 'English_front');
e107::css('forum', 'forum.css');
class forum_post_handler
{
    private $forumObj;
    private $action;
    private $id;
    private $data;
    function __construct()
    {
        $this->checkForumJump();
        require_once e_PLUGIN . 'forum/forum_class.php';
        // includes LAN file.
        $forum = new e107forum();
        $this->forumObj = $forum;
        $this->action = trim($_GET['f']);
        // action: rp|quote|nt|edit etc.
Example #16
0
<?php

/*
+ ----------------------------------------------------------------------------+
|     e107 website system
|
|     Steve Dunstan 2001-2002
|     Copyright (C) 2008-2010 e107 Inc (e107.org)
|
|
|     Released under the terms and conditions of the
|     GNU General Public License (http://gnu.org).
|
|     $URL: https://e107.svn.sourceforge.net/svnroot/e107/trunk/e107_0.7/e107_plugins/content/e_meta.php $
|     $Revision: 12136 $
|     $Id: e_meta.php 12136 2011-04-15 18:04:06Z e107steved $
|     $Author: e107steved $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) {
    exit;
}
//if (substr(e_PAGE, 0, 7) != 'content') return;
if (defined("e_URL_LEGACY")) {
    echo "<link rel='canonical' href='" . SITEURL . e_URL_LEGACY . "' />\n";
} else {
    echo "<link rel='canonical' href='" . e_REQUEST_URL . "'/>\n";
}
if (USER_AREA && strpos(e_REQUEST_URI, 'content') !== false) {
    e107::css('content', 'content.css');
}
Example #17
0
<?php

if (USER_AREA === true) {
    e107::css('linkwords', 'linkwords.css');
}
Example #18
0
}
e107::js('core', 'plupload/plupload.full.js', 'jquery', 2);
e107::css('core', 'plupload/jquery.plupload.queue/css/jquery.plupload.queue.css', 'jquery');
e107::js('core', 'plupload/jquery.plupload.queue/jquery.plupload.queue.js', 'jquery', 2);
e107::js('core', 'core/mediaManager.js', "jquery", 5);
e107::wysiwyg(true);
/*
 * CLOSE - GO TO MAIN SCREEN
 */
if (isset($_POST['submit_cancel_show'])) {
    header('Location: ' . e_SELF);
    exit;
}
include_lan(e_LANGUAGEDIR . e_LANGUAGE . '/admin/lan_' . e_PAGE);
if ($_GET['action'] == 'dialog') {
    e107::css('inline', "body { background-color: #373737 } ");
}
if (vartrue($_GET['action']) == 'nav' && e_AJAX_REQUEST) {
    define("e_IFRAME", true);
    // require_once(e_ADMIN."auth.php");
    $bbcodeMode = $_GET['bbcode'] == 'img' ? 'bbcode=img' : FALSE;
    if ($_GET['from']) {
        $bbcodeMode .= "&from=" . intval($_GET['from']);
    }
    if ($_GET['w']) {
        $bbcodeMode .= "&w=" . intval($_GET['w']);
    }
    $bbcodeMode .= "&nav=1";
    $tag = $bbcodeMode === false ? false : $_GET['tagid'];
    // eg. news, news-thumbnail
    if ($_GET['search']) {
Example #19
0
File: faqs.php Project: armpit/e107
    exit;
} else {
    e107::includeLan(e_PLUGIN . "faqs/languages/" . e_LANGUAGE . "/" . e_LANGUAGE . "_front.php");
}
require_once e_HANDLER . "form_handler.php";
require_once e_HANDLER . "userclass_class.php";
require_once e_HANDLER . "ren_help.php";
require_once e_HANDLER . "comment_class.php";
if (!vartrue($FAQ_VIEW_TEMPLATE)) {
    if (file_exists(THEME . "faqs_template.php")) {
        //	require_once (THEME."faqs_template.php");
    } else {
        //	require_once (e_PLUGIN."faqs/templates/faqs_template.php");
    }
}
e107::css('faqs', 'faqs.css');
// require_once(HEADERF);
// $pref['add_faq']=1;
$rs = new form();
$cobj = new comment();
if (!vartrue($_GET['elan']) && empty($_GET)) {
    $qs = explode(".", e_QUERY);
    $action = $qs[0];
    $id = $qs[1];
    $idx = $qs[2];
} else {
}
$from = vartrue($from) ? $from : 0;
$amount = 50;
if (isset($_POST['faq_submit'])) {
    $message = "-";
Example #20
0
 * Copyright (C) 2008-2013 e107 Inc (e107.org)
 * Released under the terms and conditions of the
 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
 *
 */
if (!defined('e107_INIT')) {
    require_once "../../class2.php";
}
if (!e107::isInstalled('log')) {
    header('Location: ' . e_BASE . 'index.php');
    exit;
}
e107::includeLan(e_PLUGIN . 'log/languages/' . e_LANGUAGE . '.php');
$bar = file_exists(THEME . 'images/bar.png') ? THEME_ABS . 'images/bar.png' : e_IMAGE_ABS . 'generic/bar.png';
$mes = e107::getMessage();
e107::css('inline', "\n/* Site Stats */\n.b { background-image: url('" . $bar . "'); border: 1px solid #999; height: 10px; font-size: 0px }\n");
require_once HEADERF;
if (!check_class(e107::getPref('statUserclass'))) {
    $mes->addError(ADSTAT_L4);
    $ns->tablerender(ADSTAT_L6, $mes->render());
    require_once FOOTERF;
    exit;
}
if (!e107::getPref('statActivate')) {
    $text = ADMIN ? "<div style='text-align:center'>" . ADSTAT_L41 . "</div>" : "<div style='text-align:center'>" . ADSTAT_L5 . "</div>";
    $ns->tablerender(ADSTAT_L6, $text);
    require_once FOOTERF;
    exit;
}
$qs = explode('.', e_QUERY, 3);
$action = varset($qs[0], 1);
Example #21
0
<?php

/*
 * e107 website system
 *
 * Copyright (C) 2008-2009 e107 Inc (e107.org)
 * Released under the terms and conditions of the
 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
 *
 *
 *
 * $URL$
 * $Id$
 */
if (!defined('e107_INIT')) {
    exit;
}
e107::css('inline', '
	a.e-wysiwyg-toggle { margin-top:5px }

');
Example #22
0
*/
/**
 *
 * @package     e107
 * @subpackage	admin
 * @version     $Revision$
 * @author      $Author$

 *	Admin-related functions for custom page and menu creation
*/
require_once '../class2.php';
if (!getperms("5|J")) {
    header('location:' . e_ADMIN . 'admin.php');
    exit;
}
e107::css('inline', "\n\n.e-wysiwyg { height: 400px }\n");
include_lan(e_LANGUAGEDIR . e_LANGUAGE . '/admin/lan_' . e_PAGE);
$e_sub_cat = 'custom';
require_once e_HANDLER . 'userclass_class.php';
require_once e_HANDLER . 'message_handler.php';
require_once e_HANDLER . 'form_handler.php';
$frm = new e_form(true);
$emessage = eMessage::getInstance();
// $page = new page;
/*
if (e_QUERY)
{
	$tmp        = explode(".", e_QUERY);
	$action     = $tmp[0];
	$sub_action = varset($tmp[1]);
	$id         = intval(varset($tmp[2], 0));
Example #23
0
 */
if (!defined('e107_INIT')) {
    exit;
}
define("BOOTSTRAP", 3);
define("FONTAWESOME", 4);
define('VIEWPORT', "width=device-width, initial-scale=1.0");
//e107::js("url", 			"https://netdna.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js");
//e107::css('url', 			'https://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css');
// e107::css('url', 			"https://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
// @see https://www.cdnperf.com
// Warning: Some bootstrap CDNs are not compiled with popup.js
// use https if e107 is using https.
e107::js("url", "https://cdn.jsdelivr.net/bootstrap/3.3.5/js/bootstrap.min.js", 'jquery', 2);
e107::css('url', 'https://cdn.jsdelivr.net/bootstrap/3.3.5/css/bootstrap.min.css');
e107::css('url', 'https://cdn.jsdelivr.net/fontawesome/4.4.0/css/font-awesome.min.css');
e107::js("footer-inline", "\$('.e-tip').tooltip({container: 'body'})");
// activate bootstrap tooltips.
define('OTHERNEWS_COLS', false);
// no tables, only divs.
define('OTHERNEWS_LIMIT', 3);
// Limit to 3.
define('OTHERNEWS2_COLS', false);
// no tables, only divs.
define('OTHERNEWS2_LIMIT', 3);
// Limit to 3.
define('COMMENTLINK', e107::getParser()->toGlyph('fa-comment'));
define('COMMENTOFFSTRING', '');
define('PRE_EXTENDEDSTRING', '<br />');
/**
 * @param string $caption
Example #24
0
<?php

if (!defined('e107_INIT')) {
    exit;
}
if (USER_AREA and strpos(e_REQUEST_URI, 'collection')) {
    if (function_exists('libraries_load') && ($library = libraries_load('prettyPhoto')) && !empty($library['loaded'])) {
    } else {
        /* if libraries plugin is not used */
        e107::js('gallery', 'jslib/prettyPhoto/js/jquery.prettyPhoto.js', 'jquery');
        e107::css('gallery', 'jslib/prettyPhoto/css/prettyPhoto.css', 'jquery');
    }
    $settings = array('hook' => 'data-gal', 'theme' => 'pp_default', 'overlay_gallery' => false, 'deeplinking' => false);
    e107::js('settings', array('collection' => $settings));
    // Now load behavior.
    e107::js('footer', '{e_PLUGIN}collection/prettyphoto.init.js');
}
?>

Example #25
0
 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
 *
 * URL and front controller Management
 *
 * $URL$
 * $Id$
*/
require_once '../class2.php';
if (!ADMIN || !getperms('L')) {
    e107::redirect('admin');
    exit;
}
e107::coreLan('eurl', true);
// TODO - admin interface support, remove it from globals
$e_sub_cat = 'eurl';
e107::css('inline', " span.e-help { cursor: help } ");
class eurl_admin extends e_admin_dispatcher
{
    protected $modes = array('main' => array('controller' => 'eurl_admin_ui', 'path' => null, 'ui' => 'eurl_admin_form_ui', 'uipath' => null));
    protected $adminMenu = array('main/config' => array('caption' => LAN_EURL_MENU_CONFIG, 'perm' => 'L'), 'main/alias' => array('caption' => LAN_EURL_MENU_ALIASES, 'perm' => 'L'), 'main/settings' => array('caption' => LAN_EURL_MENU_SETTINGS, 'perm' => 'L'), 'main/simple' => array('caption' => LAN_EURL_MENU_REDIRECTS, 'perm' => 'L'));
    protected $adminMenuAliases = array();
    protected $defaultAction = 'config';
    protected $menuTitle = LAN_EURL_MENU;
}
class eurl_admin_ui extends e_admin_controller_ui
{
    public $api;
    protected $prefs = array('url_disable_pathinfo' => array('title' => LAN_EURL_SETTINGS_PATHINFO, 'type' => 'boolean', 'help' => LAN_EURL_MODREWR_DESCR), 'url_main_module' => array('title' => LAN_EURL_SETTINGS_MAINMODULE, 'type' => 'dropdown', 'data' => 'string', 'help' => LAN_EURL_SETTINGS_MAINMODULE_HELP), 'url_error_redirect' => array('title' => LAN_EURL_SETTINGS_REDIRECT, 'type' => 'boolean', 'help' => LAN_EURL_SETTINGS_REDIRECT_HELP), 'url_sef_translate' => array('title' => LAN_EURL_SETTINGS_SEFTRANSLATE, 'type' => 'dropdown', 'data' => 'string', 'help' => LAN_EURL_SETTINGS_SEFTRANSLATE_HELP));
    public function init()
    {
        if (e_AJAX_REQUEST) {
Example #26
0
File: auth.php Project: notzen/e107
            session_set(e_COOKIE, $cookieval, time() + 3600 * 24 * 30);
            e107::getEvent()->trigger("login", $edata_li);
            e107::getRedirect()->redirect(e_ADMIN_ABS . 'admin.php');
            //echo "<script type='text/javascript'>document.location.href='admin.php'</script>\n";
        }
    }
    $e_sub_cat = 'logout';
    if (ADMIN == FALSE) {
        define("e_IFRAME", TRUE);
    }
    if (!defset('NO_HEADER')) {
        require_once e_ADMIN . "header.php";
    }
    if (ADMIN == FALSE) {
        // Needs help from Deso, Vesko and Stoev! :-)
        e107::css('inline', "\n\t\t\n\t\t\tbody \t\t\t\t{ \ttext-align: left; font-size:15px; line-height:1.5em; font-weight:normal; font-family:Arial, Helvetica, sans-serif; background:#081D28 url(" . e_IMAGE . "logo_template_large.png) no-repeat 50% 40px; }\n\t\t\ta\t\t\t\t\t{ \tcolor:#F6931E; text-decoration:none; }\n\t\t\ta:hover\t\t\t\t{ \tcolor:silver; text-decoration:none; }\n\t\t\t.bold\t\t\t\t{ \tfont-weight:bold; }\n\t\t\t.field\t\t\t\t{ \ttext-align:center;padding:5px }\n\t\t\t.field input\t\t{\tpadding:5px; \n\t\t\t\t\t\t\t\t\tborder-width:1px;\t\t\t\t\t\t\t\n    \t\t\t\t\t\t\t\tborder-style:solid;\n    \t\t\t\t\t\t\t\tborder-color:#aaa #c8c8c8 #c8c8c8 #aaa;\n\t\t\t\t\t\t\t\t\tbackground:#fff;\n\t\t\t\t\t\t\t\t\tfont:16px arial, helvetica, sans-serif;\n\t\t\t\t\t\t\t\t\t-moz-border-radius: 4px;\n\t\t\t\t\t\t\t\t\t-webkit-border-radius: 4px;\n\t\t\t\t\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\t\t\t\t\t-moz-box-shadow: 1px 1px 2px #999 inset;\n\t\t\t\t\t\t\t\t\t-webkit-box-shadow: 1px 1px 2px #999 inset;\n\t\t\t\t\t\t\t\t\tbox-shadow: 1px 1px 2px #999 inset;\n\t\t\t\t\t\t\t\t}\n\t\t\t\n\t\t\t.field input:focus\t{\n\t\t\t\t\t\t\t\t\tborder:1px solid #F6931E;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t.field input:hover\t{\n\t\t\t\t\t\t\t\t\tborder:1px solid #F6931E;\n\t\t\t\t\t\t\t\t}\n\t\t\t\n\t\t\t#login-admin \t\t{\n\t\t\t\t\t\t\t\t\tmargin-left:auto;\n\t\t\t\t\t\t\t\t\tmargin-right:auto;\n\t\t\t\t\t\t\t\t\tmargin-top:12%;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\twidth:400px; \n\t\t\t\t\t\t\t\t\t/*\t\n\t\t\t\t\t\t\t\t\tpadding: 10px 20px 0 20px;\n\t\t\t\t\t\t\t\t\t-moz-border-radius:5px;\n\t\t\t\t\t\t\t\t\t-webkit-border-radius:5px;\n\t\t\t\t\t\t\t\t\tborder-radius:5px;\n\t\t\t\t\t\t\t\t\t-moz-box-shadow:5px 5px 20px #000000;\n\t\t\t\t\t\t\t\t\t-webkit-box-shadow:5px 5px 20px #000000;\n\t\t\t\t\t\t\t\t\tbox-shadow:5px 5px 20px #000000;\t\n\t\t\t\t\t\t\t\t\tbackground-color: #FEFEFE;\n\t\t\t\t\t\t\t\t\t*/\n\t\t\t\t\t\t\t\t}\n\t\t\t\n\t\t\t#login-admin label \t{ \tdisplay: none; text-align: right\t}\n\t\t\t\t\n\t\t\t\n\t\t\t.admin-submit \t\t{ \ttext-align: center; \tpadding:20px;\t}\n\t\t\t\n\t\t\t.submit\t\t\t\t{  }\n\t\t\t\n\t\t\n\t\t\t.placeholder \t\t{\tcolor: #bbb; font-style:italic\t}\n\t\n\t\t\t::-webkit-input-placeholder { font-style:italic;\tcolor: #bbb; \t}\n\t\t\n\t\t\t:-moz-placeholder \t{ font-style:italic;\tcolor: #bbb; \t\t}\n\t\t\t\n\t\t\th2\t\t\t\t\t{ text-align: center; color: #FAAD3D;  }\n\t\t\t\n\t\t\t#username\t\t\t{background: url(" . e_IMAGE . "admin_images/admins_16.png) no-repeat scroll 7px 7px; padding-left:30px; }\n\t\t\t\t \n\t\t\t#userpass\t\t\t{background: url(" . e_IMAGE . "admin_images/lock_16.png) no-repeat scroll 7px 7px; padding-left:30px; }\n\t\t\t\n\t\t\tinput[disabled] \t{\tcolor: silver;\t}\n\t\t\tbutton[disabled] span\t{\tcolor: silver;\t}\n\t\t\n\t\t");
        $obj = new auth();
        $obj->authform();
        if (!defset('NO_HEADER')) {
            require_once e_ADMIN . "footer.php";
        }
        exit;
    }
}
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
class auth
{
    /**
     * Admin auth login
     * @return null
     */
Example #27
0
    function avatarPage()
    {
        global $pref;
        if (isset($_POST['submit_show_delete_multi'])) {
            $this->avatarPageDeleteChecked();
        }
        e107::css('inline', '
			span.avatar-label { width:100%; display:block; padding:5px; margin-bottom:5px }
			div.avatar-container { margin-bottom:5px; max-height:350px }

			');
        $sql = e107::getDb();
        $frm = e107::getForm();
        $tp = e107::getParser();
        $mes = e107::getMessage();
        $avFiles = e107::getFile()->get_files(e_MEDIA . "avatars/", ".jpg|.png|.gif|.jpeg|.JPG|.GIF|.PNG", null, 2);
        $dirlist = array();
        foreach ($avFiles as $f) {
            $dirlist[] = str_replace(e_MEDIA . "avatars/", "", $f['path']) . $f['fname'];
        }
        $text = '';
        if (empty($dirlist)) {
            $text .= IMALAN_29;
        } else {
            $tmp = $sql->retrieve('user', 'user_id,user_image', 'user_image !="" ', true);
            $imageUsed = array();
            foreach ($tmp as $val) {
                $id = $val['user_id'];
                $imageUsed[$id] = str_replace("-upload-", "", $val['user_image']);
            }
            $userImages = array_flip($imageUsed);
            $text = $frm->open('core-image-avatars');
            $text .= "<div  id='core-image-show-avatars' class='row'>";
            $count = 0;
            while (list($key, $image_name) = each($dirlist)) {
                //$users = IMALAN_21." | ";
                $row = array('user_id' => '');
                $image_pre = '';
                $disabled = false;
                /*
                	if ($sql->db_Select("user", "*", "user_image='-upload-".$tp->toDB($image_name)."' OR user_sess='".$tp->toDB($image_name)."'"))
                	{
                		$row = $sql->db_Fetch();
                		if($row['user_image'] == '-upload-'.$image_name) $image_pre = '-upload-';
                		$users .= "<a href='".$e107->url->create('user/profile/view', 'name='.$row['user_name'].'&id='.$row['user_id'])."'>{$row['user_name']}</a> <span class='smalltext'>(".($row['user_sess'] == $image_name ? IMALAN_24 : IMALAN_23).")</span>";
                	}
                	else
                	{
                
                	}
                */
                // :
                //		$fileName = basename($image_name);
                $fileName = basename($image_name);
                $users = in_array($fileName, $imageUsed) ? "<span class='label label-warning avatar-label'>Image in use</span>" : '<span class="label label-default avatar-label" >Not in use</span>';
                //directory?
                if (is_dir(e_MEDIA . "avatars/" . $image_name)) {
                    //File info
                    $users = "<a href='#' title='" . IMALAN_69 . ": {$image_name}'><img class='e-tip icon S16' src='" . e_IMAGE_ABS . "admin_images/info_16.png' alt='" . IMALAN_66 . ": {$image_name}' title='" . IMALAN_69 . ": {$image_name}' /></a> <span class='error'>" . IMALAN_69 . "</span>";
                    //Friendly UI - click text to select a form element
                    $img_src = '<span class="error">' . IMALAN_70 . '</span>';
                    $disabled = true;
                } else {
                    //File info
                    //	$users = "<a class='e-tip' href='#' title='".IMALAN_66.": {$image_name}'><img src='".e_IMAGE_ABS."admin_imaXXXges/info_16.png' alt='".IMALAN_66.": {$image_name}' /></a> ".$users;
                    // Control over the image size (design)
                    //	$image_size = getimagesize(e_MEDIA."avatars/".$image_name);
                    //Friendly UI - click text to select a form element
                    // Resized on-the-fly - avatar-size no longer an issue.
                    //	$attr = "aw=".$pref['im_width']."&ah=".$pref['im_height'];
                    $attr = "aw=200&ah=200";
                    $img_path = $tp->thumbUrl(e_MEDIA_ABS . "avatars/" . $image_name, $attr);
                    $type = dirname($image_name);
                    if ($prevType != $type) {
                        $text .= "<div class='col-md-12 clearfix'></div>\n\t\t\t\t\t<h4 class='clearfix col-md-12' >" . $type . "</h4>";
                    }
                    $for = $frm->name2id('multiaction-' . $image_name);
                    $img_src = "\n\t\t\t\t<div class='thumbnail'>\n\t\t\t\t<label for='" . $for . "' ><img  class='img-responsive' src='" . $img_path . "' alt='{$image_name}' title='" . IMALAN_66 . ": {$image_name}' /></label>\n\t\t\t\t</div>\n\t\t\t\t";
                    $prevType = $type;
                }
                //style attribute allowed here - server side width/height control
                //autocheck class - used for JS selectors (see eCoreImage object)
                $text .= "\n\t\t\t<div class='col-md-2 col-sm-4 center autocheck avatar-container' >\n\t\t\t\t<div class='well'>\n\t\t\t\t<div class='image-users'>{$users}</div>\n\t\t\t\t<div class='image-preview'>{$img_src}</div>\n\t\t\t\t<div class='image-delete'>\n\t\t\t\t\t" . $frm->checkbox('multiaction[]', intval($userImages[$fileName]) . "#{$image_pre}{$image_name}", false, array('id' => $for, 'disabled' => $disabled)) . "\n\t\t\t\t</div>\n\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t";
                $count++;
            }
            $text .= "</div>\n\n\t\t\t<div class='col-md-12 spacer clearfix'>\n\t\t\t\t<div class='row buttons-bar'>\n\t\t\t\t\t<input type='hidden' name='show_avatars' value='1' />\n\t\t\t\t\t" . $frm->admin_button('e_check_all', LAN_CHECKALL, 'action') . "\n\t\t\t\t\t" . $frm->admin_button('e_uncheck_all', LAN_UNCHECKALL, 'action') . "\n\t\t\t\t\t" . $frm->admin_button('submit_show_delete_multi', LAN_DELCHECKED, 'delete') . "\n\t\t\t\t\t" . $frm->admin_button('submit_show_deleteall', "Delete all unused images", 'delete') . "\n\n\t\t\t\t</div>\n\t\t\t</div>\n\n\n\t\t\t</form>\n\t\t";
            // $frm->admin_button('submit_cancel_show', IMALAN_68, 'cancel')
        }
        return $mes->render() . $text;
        // $ns->tablerender(LAN_MEDIAMANAGER." :: ".IMALAN_18, $mes->render().$text);
    }
Example #28
0
 *	Stats logging plugin - admin functions
 *
 */
require_once '../../class2.php';
if (!getperms('P') || !e107::isInstalled('log')) {
    header('Location: ' . e_HTTP . 'index.php');
    exit;
}
define('LogFlagFile', 'LogFlag.php');
include_lan(e_PLUGIN . 'log/languages/' . e_LANGUAGE . '.php');
include_lan(e_PLUGIN . 'log/languages/' . e_LANGUAGE . '_admin.php');
if (!is_writable(e_LOG)) {
    //$message = "<b>".ADSTAT_LAN_38."</b>";
    e107::getMessage()->addError(ADSTAT_LAN_28);
}
e107::css('inline', 'td.last.options { padding-right:20px } ');
// Needed on Windoze platforms - not an ideal solution!
if (!function_exists('nl_langinfo')) {
    define('MON_1', 86400);
    define('MON_2', 2764800);
    define('MON_3', 5443200);
    define('MON_4', 8035200);
    define('MON_5', 10800000);
    define('MON_6', 13392000);
    define('MON_7', 15811200);
    define('MON_8', 19008000);
    define('MON_9', 21168000);
    define('MON_10', 23760000);
    define('MON_11', 26352000);
    define('MON_12', 28944000);
    function nl_langinfo($mon)
Example #29
0
<?php

if (USER_AREA) {
    e107::css('social', 'css/fontello.css');
    $social = e107::pref('core', 'social_login');
    if (!empty($social) && is_array($social)) {
        $appID = vartrue($social['Facebook']['keys']['id']);
    }
    if (!empty($appID)) {
        e107::meta('fb:app_id', $appID);
        $locale = strtolower(CORE_LC) . "_" . strtoupper(CORE_LC2);
        $init = "\n\n\t\t\twindow.fbAsyncInit = function() {\n\t            FB.init({\n\t            appId      : '" . $appID . "',\n\t            xfbml      : true,\n\t            version    : 'v2.3'\n\t            });\n\t\t\t};\n\n\t\t\t(function(d, s, id){\n\t            var js, fjs = d.getElementsByTagName(s)[0];\n\t            if (d.getElementById(id)) {return;}\n\t            js = d.createElement(s); js.id = id;\n\t            js.src = '//connect.facebook.net/" . $locale . "/sdk.js';\n\t            fjs.parentNode.insertBefore(js, fjs);\n\t        }(document, 'script', 'facebook-jssdk'));\n\n\t        ";
        define('SOCIAL_FACEBOOK_INIT', $init);
    } else {
        define('SOCIAL_FACEBOOK_INIT', false);
    }
}
Example #30
0
    e107::css('bootstrap', 'bootstrap.min.css');
    e107::css('inline', '@media (min-width: 1000px){ body	{ padding-top: 75px;  } 
	
	 }
	
	 ');
}
e107::css('bootstrap', 'bootstrap-responsive.min.css');
e107::css('bootstrap', 'jquery-ui.custom.css');
e107::css('url', "https://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
e107::css('theme', 'js/google-code-prettify/prettify.css');
e107::js('theme', "js/google-code-prettify/prettify.js");
e107::css('page', 'css/page.navigation.css', 'jquery');
if (THEME_LAYOUT == 'docs') {
    e107::css('inline', 'body { padding-top: 40px }');
    e107::css('theme', 'css/docs.css');
    e107::js('theme', "js/holder/holder.js");
    e107::js('theme', "js/application.js");
}
//$no_core_css = TRUE;
//define("STANDARDS_MODE",TRUE);
/*
$OTHERNEWS_STYLE = '<div class="span4">
              		<h2>{NEWSTITLE}</h2>
              		<p>{NEWSSUMMARY}</p>
              		<p><a class="btn" href="{NEWSURL}">View details &raquo;</a></p>
            		</div><!--/span-->';


$OTHERNEWS2_STYLE = '<div class="span4">
              		<h2>{NEWSTITLE}</h2>