コード例 #1
0
ファイル: art.php プロジェクト: philum/cms
function prepare_tits($id, $r, $rear, $nbtrk, $nl, $prw)
{
    $ib = trim($r['ib']);
    $nl = $nl ? $nl : $_SESSION['nl'];
    $rst = $_SESSION['rstr'];
    $USE = $_SESSION['USE'];
    $read = $_SESSION['read'];
    $page = $_SESSION['page'];
    if ($nl == 'nlpop') {
        $nl = '';
        $nlp = 1;
    }
    $out['jurl'] = 'content_ajxlnk2__2_art_' . $id;
    $out['purl'] = 'popup_popart__3_' . $id . '_3';
    $out['day'] = $r['day'];
    $out['artedit'] = ' ';
    $nlb = substr($nl, 0, 2);
    if ($nlb == "nl") {
        $http = host();
    }
    $out['url'] = $http . good_url($id, $r['suj']);
    //urlread($id);
    if (!$rst[19]) {
        $out['img1'] = first_img($r['img']);
    }
    //img1
    if (!$rst[68] && $r['img'] && strpos($r['img'], '/')) {
        //gallery
        $out['btim'] = lj('', 'popup_callp___spe-ajxf_art*gallery_' . $id . '_gallery', picto('img'));
    }
    if ($_SESSION['prma']['art_mod']) {
        if ($read == $id && $prw > 2 && !$nl && !$nlp && rstr(60)) {
            $out['float'] = build_art_mod(1);
        }
        //	$out['float']=mkbub(popbub('seek','',picto('list'),'c'),'inline','position:relative; display:inline-block;','');//seek
        $out['open'] .= lj('', 'popup_popartmod__3_' . $id, picto('virtual')) . ' ';
    }
    if (!$rst[31]) {
        $out['back'] = art_back($id, $ib, $r['frm']);
    }
    //back
    if (!$rst[6] && $r['name'] != ses('qb')) {
        //author
        $out['author'] = lka(htac('author') . $r['name'], $r['name']);
    }
    if (!$rst[23] && $r['re'] > 1) {
        $out['priority'] = picto('s' . ($r['re'] - 1), 16);
    }
    if (!$rst[24]) {
        $day = mkday($r['day'], 1);
        //date
        if (!$rst[54]) {
            $out['date'] = lka(target_date($r['day']), $day);
        } else {
            $out['date'] = $day;
        }
    }
    if (!$rst[26]) {
        $out['pid'] = $id;
    }
    //id
    if (!$rst[29]) {
        $out['tag'] = tag_maker($id);
    }
    //tags
    if ($nl != 'nl') {
        $out['edit'] = admin_edit($r['name'], $id, $r['re'], $prw);
    }
    //edit
    if (rstr(27) && trim($r['mail'])) {
        $out['source'] = pub_link($r['mail']);
    }
    //source
    if ($_GET['search'] && $nl) {
        $out['search'] = nbof($nl, 19);
    }
    //rech
    if ($rear > 1 && rstr(43)) {
        $out['nbarts'] = lj('', 'popup_getcontent___parent_' . $id, nbof($rear, 1));
    }
    //nb_arts
    if (is_array($nbtrk)) {
        $nbtk = count($nbtrk);
        //tracks
        if ($read) {
            $out['tracks'] = lka(urlread($id) . '#trackback', picto('forum') . $nbtk);
        } else {
            $out['tracks'] = lj('', 'popup_trckpop___' . $id, picto('forum') . $nbtk);
        }
    }
    if ($ib > 0 && $read != $id && $read != $ib) {
        $sujb = suj_of_id($ib);
        //parent
        if ($sujb) {
            $out['parent'] = lka(urlread($ib), pictxt('copy', $sujb));
        }
    }
    if (!$rst[58] && $nlb != "nl") {
        $out['open'] .= lj('', 'popup_editbrut___' . $id, picto('conn')) . ' ';
    }
    if (!$rst[37] && $nlb != "nl") {
        $out['open'] .= popart($id) . ' ';
    }
    //popen
    if (!$rst[28] && $nlb != "nl") {
        //open
        if ($prw <= 2 && $rst[41] != "0") {
            $out['open'] .= opnart($id, $prw, '') . ' ';
        } elseif ($prw == 3 && $rear > 1) {
            $out['open'] .= opnart($id, 2, '1') . ' ';
        }
    }
    if (!$rst[25] && $r['host'] > 1000) {
        //lenght
        $out['lenght'] = picto('time', 16) . ' ' . art_lenght($r['host']);
    }
    if (!$rst[40]) {
        //rss
        $out['rss'] = lkt("", '/plug/rss1.php?read=' . $id . '&preview=full', picto('rss', 16));
    }
    if (!$rst[71] && $nlb != "nl") {
        $out['social'] = lj('', 'popup_artstats___' . $id . '_' . $r['day'], picto('users', 16));
    }
    //if($ath=@$r['opts']['authlevel'])$out['social'].=asciinb($ath);
    if ($nlb != "nl") {
        $root = host() . urlread($id);
        //social//&via=philum_info
        $rsoc = array(44 => 'http://www.facebook.com/sharer.php?u=' . $root, 45 => 'http://twitter.com/intent/tweet?original_referer=' . $root . '&url=' . $root . '&text=' . utf8_encode($r['suj']) . '&title=' . utf8_encode($r['suj']), 46 => 'http://wd.sharethis.com/api/sharer.php?destination=stumbleupon&url=' . $root);
        if (auth(6) && !$rst[45]) {
            $out['social'] .= lj('', 'popup_plup___twit_twit*share_' . $id, callico('tw'));
        }
        if (!$rst[45]) {
            $out['social'] .= lkt('', $rsoc[45], callico('tw'));
        }
        if (!$rst[44]) {
            $out['social'] .= lkt('', $rsoc[44], callico('fb'));
        }
        if (!$rst[46]) {
            $out['social'] .= lkt('', $rsoc[46], icon('stumble'));
        }
        if (!$rst[52]) {
            $out['social'] .= favs_edt($id) . ' ';
        }
        //	if(!$rst[86])$out['social'].=lj($css,'popup_track___'.$id,picto('forum')).' ';
        if (!$rst[47]) {
            $out['social'] .= lj('', 'popup_vmail___' . $id, callico('mail')) . ' ';
        }
        if (!$rst[12]) {
            $out['social'] .= lkt('', '/plug/read/' . $id, picto('print')) . ' ';
        }
        if (!$rst[49]) {
            $out['words'] = lj('', 'popup_words___' . $id, picto('search'));
        }
    }
    if ($_SESSION['plgs'] && $nlb != "nl") {
        $out['social'] = $_SESSION['plgs'];
    }
    $out['artlang'] = lang_art($id, $r['opts']);
    $out['lang'] = lang_rel_arts($id, $r['opts']);
    if (!$rst[50] or $USE) {
        $out['opt'] = btn('txtsmall2', picto('view', 16) . ' ' . $r['lu']) . ' ';
    }
    //nbof
    $out['sty'] = '';
    return $out;
}
コード例 #2
0
             echo "\n\t\t\t\t<div class=\"helper\">\n\t\t\t\t\t<h3>" . $lang['help'] . "</h3>\n\t\t\t\t\t<p>" . $lang['helper_plugin'] . "</p>\n\t\t\t\t</div>";
         } else {
             if (isset($table_name)) {
                 admin_edit($table_name, $edit_id, $edit, $edit_exclude = array('page_id', 'page_type', 'page_views', 'publish', 'page_content', 'last_modified', 'page_parent', 'page_order'));
             }
         }
     }
     if ($page_type == 'dynamic') {
         admin_edit('pixie_dynamic_settings', $edit_id, $edit, $edit_exclude = array('settings_id', 'page_id', 'admin', 'page_content'));
     }
     if ($page_type == 'module' or $page_type == 'plugin') {
         $module_name = safe_field('page_name', 'pixie_core', "page_id = '{$edit}'");
         $table = 'pixie_module_' . $module_name . '_settings';
         $id = $module_name . '_id';
         if (table_exists($table)) {
             admin_edit($table, $id, '1', $edit_exclude = array($id));
         }
     }
 } else {
     if (isset($do) && $do == 'newpage') {
         if ($type == 'dynamic') {
             echo "<div id=\"page_header\">\r\n\t\t\t\t<h2>" . $lang['settings_page_new'] . " {$type} " . $lang['settings_page'] . "</h2>\r\n\t\t\t</div>";
             if (isset($table_name)) {
                 admin_new($table_name, $edit_exclude = array('page_id', 'page_type', 'page_views', 'publish', 'admin', 'page_content', 'last_modified', 'page_parent', 'page_order'));
             }
         } else {
             if ($type == 'static') {
                 echo "<div id=\"page_header\">\r\n\t\t\t\t<h2>" . $lang['settings_page_new'] . " {$type} " . $lang['settings_page'] . "</h2>\r\n\t\t\t</div>";
                 if (isset($table_name)) {
                     admin_new($table_name, $edit_exclude = array('page_id', 'page_type', 'page_views', 'publish', 'admin', 'page_content', 'last_modified', 'page_parent', 'page_order'));
                 }
コード例 #3
0
ファイル: dynamic.php プロジェクト: joseph-mudloff/pixie-cms
 case 'admin':
     if (isset($GLOBALS['pixie_user']) && $GLOBALS['pixie_user_privs'] >= 1) {
         if ($x == "") {
             $message = 'Please create a dynamic page in the settings area.';
         } else {
             $type = 'dynamic';
             $table_name = 'pixie_dynamic_posts';
             $edit_id = 'post_id';
             $page_id = safe_field('page_id', 'pixie_core', "page_name='{$x}'");
             if (isset($go) && $go == 'new') {
                 admin_head();
                 admin_new($table_name, $edit_exclude = array('page_id', 'post_id', 'last_modified', 'author', 'post_views', 'post_slug'));
             } else {
                 if (isset($edit) && $edit) {
                     admin_head();
                     admin_edit($table_name, $edit_id, $edit, $edit_exclude = array('page_id', 'post_id', 'last_modified', 'last_modified_by', 'author', 'post_views', 'post_slug'));
                 } else {
                     admin_carousel($x);
                     echo "\t\t\t<div id=\"blocks\">\n";
                     admin_block_search($type);
                     admin_block_tag_cloud($table_name, 'page_id = ' . $page_id . '');
                     echo "\t\t\t\t</div>\n";
                     admin_head();
                     echo "\t\t\t\t<div id=\"pixie_content\">";
                     admin_overview($table_name, 'where page_id = ' . $page_id . '', 'posted', 'desc', $exclude = array('page_id', 'post_id', 'author', 'public', 'comments', 'tags', 'content', 'last_modified', 'last_modified_by', 'post_views', 'post_slug'), '15', $type);
                     echo "\t\t\t\t</div>";
                 }
             }
         }
     }
     break;
コード例 #4
0
function bookcategorie($id = NULL, $action = NULL)
{
    admin_required();
    $type = "livro-categoria";
    $bookcategorie = new BookCategorie();
    if (!empty($id)) {
        admin_edit($bookcategorie, $type, $id, $action);
    } else {
        admin_list($bookcategorie, $type);
    }
}
コード例 #5
0
ファイル: lib_core.php プロジェクト: joseph-mudloff/pixie-cms
function admin_module($module_name, $table_name, $order_by, $asc_desc, $exclude = array(NULL), $edit_exclude = array(NULL), $view_number, $tags)
{
    global $type, $go, $page, $message, $s, $m, $x, $edit, $submit_new, $submit_edit, $delete, $messageok, $new, $search_submit, $field, $search_words;
    if (isset($GLOBALS['pixie_user_privs']) && $GLOBALS['pixie_user_privs'] >= 1) {
        $type = 'module';
        if (isset($go) && $go == 'new' && isset($table_name)) {
            admin_head();
            admin_new($table_name, $edit_exclude);
        } else {
            if (isset($edit) && $edit && isset($table_name)) {
                admin_head();
                admin_edit($table_name, $module_name . '_id', $edit, $edit_exclude);
            } else {
                if (isset($table_name)) {
                    admin_carousel($x);
                    echo "\n\t\t\t\t<div id=\"blocks\">\n";
                    admin_block_search($type);
                    if (isset($tags) && $tags == 'yes') {
                        admin_block_tag_cloud($table_name, $module_name . "_id >= 0");
                    }
                    echo "\t\t\t\t</div>\n";
                    admin_head();
                    echo "\t\t\t\t<div id=\"pixie_content\">";
                    admin_overview($table_name, '', $order_by, $asc_desc, $exclude, $view_number, $type);
                    echo "\t\t\t\t</div>\n";
                }
            }
        }
    }
}
コード例 #6
0
ファイル: static.php プロジェクト: joseph-mudloff/pixie-cms
 * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3
 *
 */
switch ($do) {
    // Module Admin
    case 'admin':
        if (isset($GLOBALS['pixie_user']) && $GLOBALS['pixie_user_privs'] >= 1) {
            $type = 'static';
            $table_name = 'pixie_core';
            $edit_id = 'page_id';
            if (!isset($edit) or !$edit) {
                $edit = safe_field('page_id', 'pixie_core', "page_name='{$x}'");
            }
            admin_carousel($x);
            admin_head();
            admin_edit($table_name, $edit_id, $edit, $edit_exclude = array('page_id', 'page_type', 'page_name', 'page_description', 'page_display_name', 'page_blocks', 'admin', 'page_views', 'public', 'publish', 'hidden', 'searchable', 'page_order', 'last_modified', 'page_parent', 'in_navigation', 'privs'));
        }
        break;
        // Show Module
    // Show Module
    default:
        if (!isset($s) && !$s) {
            $s = 404;
        }
        if (isset($s) && $s) {
            extract(safe_row('*', 'pixie_core', "page_name='{$s}'"));
            echo "<div id=\"{$s}\">\n\t\t\t\t\t\t<h3>{$page_display_name}</h3>\n";
            if (isset($_COOKIE['pixie_login'])) {
                list($username, $cookie_hash) = explode(',', $_COOKIE['pixie_login']);
                $nonce = safe_field('nonce', 'pixie_users', "user_name='{$username}'");
                if (md5($username . $nonce) == $cookie_hash) {