• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getmyurl函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getmyurl函数的典型用法代码示例。如果您正苦于以下问题:PHP getmyurl函数的具体用法?PHP getmyurl怎么用?PHP getmyurl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getmyurl函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: sendannouncement_showpage

function sendannouncement_showpage()
{
    // Method for identifying modules rather than pagename
    define('modulename', 'send_announcement');
    // $main_smarty->assign('modulename', modulename);
    force_authentication();
    $canIhaveAccess = 0;
    $canIhaveAccess = $canIhaveAccess + checklevel('admin');
    if ($canIhaveAccess == 0) {
        header("Location: " . my_base_url . my_pligg_base);
        die;
    }
    global $main_smarty, $the_template;
    include_once 'config.php';
    include_once mnminclude . 'html1.php';
    include_once mnminclude . 'link.php';
    include_once mnminclude . 'tags.php';
    include_once mnminclude . 'smartyvariables.php';
    $main_smarty = do_sidebar($main_smarty);
    // breadcrumbs
    $navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
    $navwhere['link1'] = getmyurl('admin', '');
    $navwhere['text2'] = "Send Announcement";
    $main_smarty->assign('navbar_where', $navwhere);
    $main_smarty->assign('posttitle', "Send Annoucement");
    // breadcrumbs
    $main_smarty->assign('tpl_center', send_announcement_tpl_path . 'sendannouncement');
    $main_smarty->display($the_template . '/pligg.tpl');
}
开发者ID:hyrmedia,项目名称:pligg-cms,代码行数:29,代码来源:send_announcement_main.php


示例2: hello_world_showpage

function hello_world_showpage()
{
    global $main_smarty, $the_template, $db;
    force_authentication();
    $canIhaveAccess = 0;
    $canIhaveAccess = $canIhaveAccess + checklevel('god');
    if ($canIhaveAccess == 1) {
        define('pagename', 'hello_world');
        $main_smarty->assign('pagename', pagename);
        // Method for identifying modules rather than pagename
        define('modulename', 'hello_world');
        $main_smarty->assign('modulename', modulename);
        $navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
        $navwhere['link1'] = getmyurl('admin', '');
        $main_smarty->display(hello_world_tpl_path . '/blank.tpl');
        $navwhere['text2'] = $main_smarty->get_config_vars('PLIGG_hello_world_BreadCrumb');
        $navwhere['link2'] = URL_hello_world;
        $navwhere['text3'] = '';
        $navwhere['link3'] = '';
        $navwhere['text4'] = '';
        $navwhere['link4'] = '';
        $main_smarty = do_sidebar($main_smarty);
        $main_smarty->assign('navbar_where', $navwhere);
        $main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
        $main_smarty->assign('tpl_center', hello_world_tpl_path . 'hello_world_main');
        $main_smarty->display($template_dir . '/admin/admin.tpl');
    } else {
        header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
    }
}
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:30,代码来源:hello_world_main.php


示例3: multibox_admin_showpage

function multibox_admin_showpage()
{
    global $main_smarty, $the_template, $db;
    force_authentication();
    $canIhaveAccess = 0;
    $canIhaveAccess = $canIhaveAccess + checklevel('god');
    if ($canIhaveAccess == 1) {
        define('pagename', 'multibox_admin');
        $main_smarty->assign('pagename', pagename);
        define('modulename', 'multibox_admin');
        $main_smarty->assign('modulename', modulename);
        $navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
        $navwhere['link1'] = getmyurl('admin', '');
        $main_smarty->display(multibox_admin_tpl_path . '/blank.tpl');
        $main_smarty = do_sidebar($main_smarty);
        $sql = "SELECT * FROM " . table_totals;
        $results = $db->get_results($sql);
        $main_smarty->assign('results', object_2_array($results));
        if (isset($_REQUEST['action'])) {
            $main_smarty->assign('action', $_REQUEST['action']);
            totals_regenerate();
            $sql = "SELECT * FROM " . table_totals;
            $results = $db->get_results($sql);
            $main_smarty->assign('new_results', object_2_array($results));
        }
        $main_smarty->assign('navbar_where', $navwhere);
        $main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
        $main_smarty->assign('tpl_center', multibox_admin_tpl_path . 'multibox_main');
        $main_smarty->display($template_dir . '/admin/admin.tpl');
    } else {
        echo "Page Forbidden";
    }
}
开发者ID:pantofla,项目名称:waterfan,代码行数:33,代码来源:multibox_admin_main.php


示例4: random_story_getdata

function random_story_getdata()
{
    global $view, $db, $current_user, $main_smarty;
    $cols = $db->get_col('select link_id from ' . table_links . ' where `link_status` = "published" order by link_id desc limit 200;');
    //echo count($cols);
    if ($cols) {
        $randstory = rand(1, count($cols));
        $randstoryurl = getmyurl("story", $randstory);
        $main_smarty->assign('random_story_randstoryurl', $randstoryurl);
    }
}
开发者ID:holsinger,项目名称:openfloor,代码行数:11,代码来源:random_story_main.php


示例5: karma_showpage

function karma_showpage()
{
    global $db, $main_smarty, $the_template;
    include_once 'config.php';
    include_once mnminclude . 'html1.php';
    include_once mnminclude . 'link.php';
    include_once mnminclude . 'tags.php';
    include_once mnminclude . 'smartyvariables.php';
    $main_smarty = do_sidebar($main_smarty);
    force_authentication();
    $canIhaveAccess = 0;
    $canIhaveAccess = $canIhaveAccess + checklevel('admin');
    if ($canIhaveAccess == 1) {
        // Save settings
        if ($_POST['submit']) {
            misc_data_update('karma_submit_story', sanitize($_REQUEST['karma_submit_story'], 3));
            misc_data_update('karma_submit_comment', sanitize($_REQUEST['karma_submit_comment'], 3));
            misc_data_update('karma_story_publish', sanitize($_REQUEST['karma_story_publish'], 3));
            misc_data_update('karma_story_vote', sanitize($_REQUEST['karma_story_vote'], 3));
            misc_data_update('karma_story_unvote', sanitize($_REQUEST['karma_story_vote_remove'], 3));
            misc_data_update('karma_comment_vote', sanitize($_REQUEST['karma_comment_vote'], 3));
            misc_data_update('karma_story_discard', sanitize($_REQUEST['karma_story_discard'], 3));
            misc_data_update('karma_story_spam', sanitize($_REQUEST['karma_story_spam'], 3));
            misc_data_update('karma_comment_delete', sanitize($_REQUEST['karma_comment_delete'], 3));
            if ($_REQUEST['karma_username'] && $_REQUEST['karma_value'] != 0) {
                $db->query($sql = "UPDATE " . table_users . " SET user_karma=user_karma+'" . $db->escape($_REQUEST['karma_value']) . "' WHERE user_login='" . $db->escape($_REQUEST['karma_username']) . "'");
                if (!$db->rows_affected) {
                    $error = "Wrong username " . sanitize($_REQUEST['karma_username'], 1);
                }
            }
            $main_smarty->assign('error', $error);
        }
        // breadcrumbs
        $navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
        $navwhere['link1'] = getmyurl('admin', '');
        $navwhere['text2'] = "Modify Karma";
        $navwhere['link2'] = my_pligg_base . "/module.php?module=karma";
        $main_smarty->assign('navbar_where', $navwhere);
        $main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
        // breadcrumbs
        define('modulename', 'karma');
        $main_smarty->assign('modulename', modulename);
        define('pagename', 'admin_modify_karma');
        $main_smarty->assign('pagename', pagename);
        $main_smarty->assign('settings', str_replace('"', '"', get_karma_settings()));
        $main_smarty->assign('tpl_center', karma_tpl_path . 'karma_main');
        $main_smarty->display($template_dir . '/admin/admin.tpl');
    } else {
        header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
    }
}
开发者ID:bendroid,项目名称:pligg-cms,代码行数:51,代码来源:karma_main.php


示例6: close_comments_showpage

function close_comments_showpage()
{
    global $db, $main_smarty, $the_template;
    include_once 'config.php';
    include_once mnminclude . 'html1.php';
    include_once mnminclude . 'link.php';
    include_once mnminclude . 'tags.php';
    include_once mnminclude . 'smartyvariables.php';
    $main_smarty = do_sidebar($main_smarty);
    force_authentication();
    $canIhaveAccess = 0;
    $canIhaveAccess = $canIhaveAccess + checklevel('admin');
    if ($canIhaveAccess == 1) {
        if ($_POST['submit']) {
            $_REQUEST = str_replace('"', "'", $_REQUEST);
            $close_comment_method = trim($_REQUEST['close_comment_method']);
            $close_comment_time = trim($_REQUEST['close_comment_time']);
            if ($close_comment_method == 'time') {
                misc_data_update('close_comment_method', mysql_real_escape_string($close_comment_method));
            } elseif ($close_comment_method == 'manual') {
                misc_data_update('close_comment_method', mysql_real_escape_string($close_comment_method));
            } elseif ($close_comment_method == 'both') {
                misc_data_update('close_comment_method', mysql_real_escape_string($close_comment_method));
            } else {
                $main_smarty->assign('module_error', "Method POST data did not contain an expected value");
            }
            if (is_numeric($close_comment_time)) {
                misc_data_update('close_comment_time', mysql_real_escape_string($close_comment_time));
            } else {
                $main_smarty->assign('module_error', "Time POST data did not contain a numerical value. Please give the second field a value of 0 or higher.");
            }
        }
        // breadcrumbs
        $main_smarty->assign('navbar_where', $navwhere);
        $main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
        // breadcrumbs
        define('modulename', 'close_comments');
        $main_smarty->assign('modulename', modulename);
        define('pagename', 'close_comments_settings');
        $main_smarty->assign('pagename', pagename);
        $main_smarty->assign('settings', get_close_comments_settings());
        $main_smarty->assign('tpl_center', close_comments_tpl_path . 'close_comments_settings');
        $main_smarty->display($template_dir . '/admin/admin.tpl');
    } else {
        header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
    }
}
开发者ID:hyrmedia,项目名称:modules,代码行数:47,代码来源:close_comments_main.php


示例7: zip_install_preview_admin

function zip_install_preview_admin()
{
    global $main_smarty, $the_template, $db, $my_pligg_base;
    force_authentication();
    $amIgod = 0;
    $amIgod = $amIgod + checklevel('admin');
    if ($amIgod == 1) {
        $navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
        $navwhere['link1'] = getmyurl('admin', '');
        $main_smarty->display(zip_install_tpl_path . '/blank.tpl');
        $navwhere['text2'] = 'ZIP Install';
        $navwhere['link2'] = my_pligg_base . '/module.php?module=zip_install';
        $navwhere['text3'] = '';
        $navwhere['link3'] = '';
        $navwhere['text4'] = '';
        $navwhere['link4'] = '';
        $main_smarty = do_sidebar($main_smarty);
        $main_smarty->assign('navbar_where', $navwhere);
        $main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
        $action = $_REQUEST['action'];
        switch ($action) {
            case "modules":
                $main_smarty->assign('tpl_center', zip_install_tpl_path . 'zip_install_modules');
                $main_smarty->display($template_dir . '/admin/admin.tpl');
                break;
            case "templates":
                $main_smarty->assign('tpl_center', zip_install_tpl_path . 'zip_install_templates');
                $main_smarty->display($template_dir . '/admin/admin.tpl');
                break;
            case "filemod":
                if (uploadFile(zip_install_absolute_path, $_FILES, "modules")) {
                    redirect(my_pligg_base . '/admin/admin_modules.php?status=uninstalled');
                }
                break;
            case "filetem":
                if (uploadFile(zip_install_absolute_path, $_FILES, "templates")) {
                    redirect(my_pligg_base . '/admin/admin_config.php?page=Template');
                }
                break;
            default:
                $main_smarty->assign('tpl_center', zip_install_tpl_path . 'zip_install');
                $main_smarty->display($template_dir . '/admin/admin.tpl');
                break;
        }
    }
}
开发者ID:hyrmedia,项目名称:modules,代码行数:46,代码来源:zip_install_main.php


示例8: insert_comment

function insert_comment()
{
    global $commentownerid, $link, $db, $current_user;
    // Check if is a POST of a comment
    if ($_POST['link_id'] == $link->id && $current_user->authenticated && $_POST['user_id'] == $current_user->user_id && $_POST['randkey'] > 0 && strlen($_POST['comment_content']) > 0) {
        require_once mnminclude . 'comment.php';
        $comment = new Comment();
        $comment->id = $link->commentid;
        $comment->read();
        $comment->link = $link->id;
        $comment->randkey = $_POST['randkey'];
        $comment->author = $commentownerid;
        //$_POST['user_id'];
        $comment->content = $_POST['comment_content'];
        $comment->store();
        header('Location: ' . getmyurl('story', $_GET['id']));
        die;
    }
}
开发者ID:holsinger,项目名称:openfloor,代码行数:19,代码来源:edit.php


示例9: contactable_showpage

function contactable_showpage()
{
    global $db, $main_smarty, $the_template;
    include_once 'config.php';
    include_once mnminclude . 'html1.php';
    include_once mnminclude . 'link.php';
    include_once mnminclude . 'tags.php';
    include_once mnminclude . 'smartyvariables.php';
    $main_smarty = do_sidebar($main_smarty);
    force_authentication();
    $canIhaveAccess = 0;
    $canIhaveAccess = $canIhaveAccess + checklevel('admin');
    if ($canIhaveAccess == 1) {
        if ($_POST['submit']) {
            $_REQUEST = str_replace('"', "'", $_REQUEST);
            $contactable_input = $_REQUEST['contactable_mail'];
            $result = filter_var($contactable_input, FILTER_VALIDATE_EMAIL);
            // Checking if the email is valid. Returns 'false' if not valid.
            if (!$result) {
                // Email is not valid
                $msg = "Error! Your email address does not appear to be valid.";
            } else {
                // Add email address to database field
                misc_data_update('contactable_mail', mysql_real_escape_string($contactable_input));
            }
        }
        // breadcrumbs
        $main_smarty->assign('navbar_where', $navwhere);
        $main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
        define('modulename', 'contactable');
        $main_smarty->assign('modulename', modulename);
        define('pagename', 'admin_contactable');
        $main_smarty->assign('pagename', pagename);
        $main_smarty->assign('msg', $msg);
        // Error messages
        $main_smarty->assign('contactable', get_contactable_settings());
        $main_smarty->assign('tpl_center', contactable_tpl_path . 'settings');
        $main_smarty->display($template_dir . '/admin/admin.tpl');
    } else {
        header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
    }
}
开发者ID:hyrmedia,项目名称:modules,代码行数:42,代码来源:contactable_main.php


示例10: spam_trigger_showpage

function spam_trigger_showpage()
{
    global $db, $main_smarty, $the_template;
    include_once 'config.php';
    include_once mnminclude . 'html1.php';
    include_once mnminclude . 'link.php';
    include_once mnminclude . 'tags.php';
    include_once mnminclude . 'smartyvariables.php';
    $main_smarty = do_sidebar($main_smarty);
    force_authentication();
    $canIhaveAccess = 0;
    $canIhaveAccess = $canIhaveAccess + checklevel('admin');
    if ($canIhaveAccess == 1) {
        // Save settings
        if ($_POST['submit']) {
            misc_data_update('spam_trigger_light', sanitize($_REQUEST['spam_light'], 3));
            misc_data_update('spam_trigger_medium', sanitize($_REQUEST['spam_medium'], 3));
            misc_data_update('spam_trigger_hard', sanitize($_REQUEST['spam_hard'], 3));
            header("Location: " . my_pligg_base . "/module.php?module=spam_trigger");
            die;
        }
        // breadcrumbs
        $navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
        $navwhere['link1'] = getmyurl('admin', '');
        $navwhere['text2'] = "Modify spam_trigger";
        $navwhere['link2'] = my_pligg_base . "/module.php?module=spam_trigger";
        $main_smarty->assign('navbar_where', $navwhere);
        $main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
        define('modulename', 'spam_trigger');
        $main_smarty->assign('modulename', modulename);
        define('pagename', 'admin_modifyspam_trigger');
        $main_smarty->assign('pagename', pagename);
        $main_smarty->assign('settings', str_replace('"', '"', get_spam_trigger_settings()));
        $main_smarty->assign('places', $spam_trigger_places);
        $main_smarty->assign('tpl_center', spam_trigger_tpl_path . 'spam_trigger_main');
        $main_smarty->display($template_dir . '/admin/admin.tpl');
    } else {
        header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
    }
}
开发者ID:bendroid,项目名称:pligg-cms,代码行数:40,代码来源:spam_trigger_main.php


示例11: pligg_web_toolbar_showpage

function pligg_web_toolbar_showpage()
{
    global $main_smarty, $the_template, $db;
    force_authentication();
    $canIhaveAccess = 0;
    $canIhaveAccess = $canIhaveAccess + checklevel('admin');
    if ($canIhaveAccess == 1) {
        define('pagename', 'pligg_web_toolbar');
        $main_smarty->assign('pagename', pagename);
        // Method for identifying modules rather than pagename
        define('modulename', 'pligg_web_toolbar');
        $main_smarty->assign('modulename', modulename);
        $navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
        $navwhere['link1'] = getmyurl('admin', '');
        $navwhere['text2'] = $main_smarty->get_config_vars('PLIGG_pligg_web_toolbar_BreadCrumb');
        $navwhere['link2'] = URL_pligg_web_toolbar;
        $navwhere['text3'] = '';
        $navwhere['link3'] = '';
        $navwhere['text4'] = '';
        $navwhere['link4'] = '';
        if (isset($_REQUEST['action'])) {
            $action = $_REQUEST['action'];
        } else {
            $action = '';
        }
        if ($action == 'enable') {
            enable_pligg_web_toolbar();
        }
        if ($action == 'disable') {
            disable_pligg_web_toolbar();
        }
        $main_smarty = do_sidebar($main_smarty);
        $main_smarty->assign('navbar_where', $navwhere);
        $main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
        $main_smarty->assign('tpl_center', pligg_web_toolbar_tpl_path . 'pligg_web_toolbar_main');
        $main_smarty->display($template_dir . '/admin/admin.tpl');
    } else {
        header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
    }
}
开发者ID:hyrmedia,项目名称:modules,代码行数:40,代码来源:pligg_web_toolbar_main.php


示例12: analytics_showpage

function analytics_showpage()
{
    global $db, $main_smarty, $the_template;
    include_once 'config.php';
    include_once mnminclude . 'html1.php';
    include_once mnminclude . 'link.php';
    include_once mnminclude . 'tags.php';
    include_once mnminclude . 'smartyvariables.php';
    $main_smarty = do_sidebar($main_smarty);
    force_authentication();
    $canIhaveAccess = 0;
    $canIhaveAccess = $canIhaveAccess + checklevel('admin');
    if ($canIhaveAccess == 1) {
        if ($_POST['submit']) {
            $_REQUEST = str_replace('"', "'", $_REQUEST);
            $analytics_input = substr($_REQUEST['analytics_id'], 0, 14);
            // Shorten input to 14 characters (max length of Analytics IDs)
            if (strlen($analytics_input) > '14') {
                $msg = "Error! The value entered was more than 14 characters in length. Please try again.";
            }
            misc_data_update('analytics_id', mysql_real_escape_string($analytics_input));
        }
        // breadcrumbs
        $main_smarty->assign('navbar_where', $navwhere);
        $main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
        define('modulename', 'analytics');
        $main_smarty->assign('modulename', modulename);
        define('pagename', 'admin_analytics');
        $main_smarty->assign('pagename', pagename);
        $main_smarty->assign('msg', $msg);
        // Error messages
        $main_smarty->assign('settings', get_analytics_settings());
        $main_smarty->assign('tpl_center', analytics_tpl_path . 'settings');
        $main_smarty->display($template_dir . '/admin/admin.tpl');
    } else {
        header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
    }
}
开发者ID:hyrmedia,项目名称:modules,代码行数:38,代码来源:analytics_main.php


示例13: links_showpage

function links_showpage()
{
    global $db, $main_smarty, $the_template;
    include_once 'config.php';
    include_once mnminclude . 'html1.php';
    include_once mnminclude . 'link.php';
    include_once mnminclude . 'tags.php';
    include_once mnminclude . 'smartyvariables.php';
    $main_smarty = do_sidebar($main_smarty);
    force_authentication();
    $canIhaveAccess = 0;
    $canIhaveAccess = $canIhaveAccess + checklevel('god');
    if ($canIhaveAccess == 1) {
        if ($_POST['submit']) {
            misc_data_update('links_comments', sanitize($_REQUEST['links_comments'], 3));
            misc_data_update('links_stories', sanitize($_REQUEST['links_stories'], 3));
            misc_data_update('links_nofollow', sanitize($_REQUEST['links_nofollow'], 3));
            misc_data_update('links_host', sanitize($_REQUEST['links_host'], 3));
            header("Location: " . my_pligg_base . "/module.php?module=links");
            die;
        }
        // breadcrumbs
        $main_smarty->assign('navbar_where', $navwhere);
        $main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
        // breadcrumbs
        define('modulename', 'links');
        $main_smarty->assign('modulename', modulename);
        define('pagename', 'admin_modifylinks');
        $main_smarty->assign('pagename', pagename);
        $main_smarty->assign('settings', links_settings());
        $main_smarty->assign('tpl_center', links_tpl_path . 'links_main');
        $main_smarty->display($template_dir . '/admin/admin.tpl');
    } else {
        header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
    }
}
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:36,代码来源:links_main.php


示例14: Smarty

<?php

include_once 'Smarty.class.php';
$main_smarty = new Smarty();
include 'config.php';
include mnminclude . 'html1.php';
include mnminclude . 'ts.php';
include mnminclude . 'link.php';
include mnminclude . 'tags.php';
include mnminclude . 'smartyvariables.php';
include mnminclude . 'admin_config.php';
// -------------------------------------------------------------------------------------
force_authentication();
// breadcrumbs
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
$navwhere['link1'] = getmyurl('admin', '');
$navwhere['text2'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel_5') . $main_smarty->get_config_vars('PLIGG_Visual_Name');
$navwhere['link2'] = my_pligg_base . "/admin_config.php";
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
// breadcrumbs
$main_smarty = do_sidebar($main_smarty);
define('pagename', 'admin_config');
$main_smarty->assign('pagename', pagename);
$main_smarty->assign('tpl_center', $the_template . '/admin_templates/admin_config_center');
if (isset($_REQUEST['action'])) {
    $main_smarty->display($the_template . '/blank.tpl');
} else {
    $main_smarty->display($the_template . '/pligg.tpl');
}
function dowork()
开发者ID:holsinger,项目名称:openfloor,代码行数:31,代码来源:admin_config.php


示例15: getmyurl

}
//else
//	$group_description = $group_description;
if (isset($_POST["group_privacy"])) {
    $group_privacy = $db->escape(sanitize($_POST["group_privacy"], 3));
}
//else
//	$group_privacy = $group_privacy;
if (isset($_POST["group_title"]) || isset($_POST["group_description"]) || isset($_POST["group_privacy"])) {
    global $db, $main_smarty;
    $group_update = "update " . table_groups . " set group_name = '" . $group_title . "', group_description = '" . $group_description . "', group_privacy = '" . $group_privacy . "' where group_id = '" . $requestID . "'";
    $db->query($group_update);
    if ($group_update) {
        //page redirect
        $redirect = '';
        $redirect = getmyurl("editgroup", $requestID);
        header("Location: {$redirect}");
        die;
    }
}
// uploading avatar
if ($_POST["avatar"] == "uploaded") {
    $user_image_path = "avatars/groups_uploaded" . "/";
    $user_image_apath = "/" . $user_image_path;
    $allowedFileTypes = array("image/jpeg", "image/gif", "image/png", 'image/x-png', 'image/pjpeg');
    unset($imagename);
    $myfile = $_FILES['image_file']['name'];
    $imagename = basename($myfile);
    $mytmpfile = $_FILES['image_file']['tmp_name'];
    if (!in_array($_FILES['image_file']['type'], $allowedFileTypes)) {
        $error['Type'] = 'Only these file types are allowed : jpeg, gif, png';
开发者ID:pantofla,项目名称:waterfan,代码行数:31,代码来源:editgroup.php


示例16: Smarty

// 		http://www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".
include_once 'Smarty.class.php';
$main_smarty = new Smarty();
include 'config.php';
include mnminclude . 'html1.php';
include mnminclude . 'link.php';
include mnminclude . 'tags.php';
include mnminclude . 'user.php';
include mnminclude . 'comment.php';
include mnminclude . 'smartyvariables.php';
// breadcrumbs and page title
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_Live');
$navwhere['link1'] = getmyurl('live', '');
$navwhere['text2'] = $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_Comments');
$navwhere['link2'] = getmyurl('live_comments', '');
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_Comments'));
// figure out what "page" of the results we're on
$offset = (get_current_page() - 1) * $top_users_size;
$select = "SELECT * ";
$from_where = " FROM " . table_comments . "\n\t\tLEFT JOIN " . table_links . " ON comment_link_id=link_id \n\t\tLEFT JOIN " . table_users . " ON comment_user_id=user_id ";
$order_by = " ORDER BY comment_id DESC";
// pagename
define('pagename', 'live_comments');
$main_smarty->assign('pagename', pagename);
// get the data to be displayed
$rows = $db->get_var("SELECT count(*) as count {$from_where} {$order_by}");
$comments = $db->get_results("{$select} {$from_where} {$order_by} LIMIT {$offset},{$top_users_size}");
//$comment = new Comment;
//$user = new User;
开发者ID:pantofla,项目名称:waterfan,代码行数:31,代码来源:live_comments.php


示例17: Smarty

<?php

include_once 'internal/Smarty.class.php';
$main_smarty = new Smarty();
include 'config.php';
include mnminclude . 'html1.php';
include mnminclude . 'link.php';
include mnminclude . 'tags.php';
include mnminclude . 'smartyvariables.php';
check_referrer();
// breadcrumbs and page title
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Change_Template');
$navwhere['link1'] = getmyurl('profile', '');
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', $main_smarty->get_config_vars('PLIGG_Visual_Change_Template'));
// pagename
define('pagename', 'settemplate');
$main_smarty->assign('pagename', pagename);
if (isset($_GET['template'])) {
    if (file_exists("./templates/" . $_GET['template'] . "/link_summary.tpl")) {
        $domain = !strstr($_SERVER['HTTP_HOST'], '.') ? '' : preg_replace('/^www/', '', $_SERVER['HTTP_HOST']);
        setcookie("template", $_GET['template'], time() + 60 * 60 * 24 * 30, $my_pligg_base, $domain);
        header('Location: ./index.php');
        die;
    } else {
        $main_smarty->assign('message', '<div class="alert alert-error">Warning: <strong>"' . sanitize($_GET['template'], 3) . '"</strong> does not seem to exist!</div>');
    }
}
// show the template
$main_smarty->assign('tpl_center', $the_template . '/settemplate_center');
$main_smarty->display($the_template . '/pligg.tpl');
开发者ID:hyrmedia,项目名称:pligg-cms,代码行数:31,代码来源:settemplate.php


示例18: do_sidebar

//  make sure my_base_url is set
if ($my_base_url == '') {
    echo '<div style="text-align:center;"><span class=error>ERROR: my_base_url is not set. Please correct this using the <a href = "/admin/admin_config.php?page=Location%20Installed">admin panel</a>. Then refresh this page.</span></div>';
}
// sidebar
$main_smarty = do_sidebar($main_smarty);
$sql = "SELECT user_login FROM " . table_users . " ORDER BY user_id DESC LIMIT 1";
$last_user = $db->get_var($sql);
$main_smarty->assign('last_user', $last_user);
// misc smarty
if (isset($from_text)) {
    $main_smarty->assign('from_text', $from_text);
}
if (isset($search->setmek)) {
    $main_smarty->assign('setmeka', $search->setmek);
} else {
    $main_smarty->assign('setmeka', '');
}
$main_smarty->assign('URL_rss_page', getmyurl('rsspage', $category_data->category_safe_name, ''));
$fetch_link_summary = true;
include './libs/link_summary.php';
// this is the code that show the links / stories
//For Infinit scrolling and continue reading option
if (Auto_scroll == 2 || Auto_scroll == 3) {
    $main_smarty->assign("scrollpageSize", $page_size);
} else {
    $main_smarty->assign('link_pagination', do_pages($rows, $page_size, "published", true));
}
// show the template
$main_smarty->assign('tpl_center', $the_template . '/index_center');
$main_smarty->display($the_template . '/pligg.tpl');
开发者ID:bendroid,项目名称:pligg-cms,代码行数:31,代码来源:index.php


示例19: Smarty

<?php

include_once 'internal/Smarty.class.php';
$main_smarty = new Smarty();
include 'config.php';
include mnminclude . 'html1.php';
include mnminclude . 'link.php';
include mnminclude . 'smartyvariables.php';
// breadcrumbs and page title
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_Recover_Password');
$navwhere['link1'] = getmyurl('loginNoVar', '');
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_Recover_Password'));
// sidebar
$main_smarty = do_sidebar($main_smarty);
// initialize error message variable
$errorMsg = "";
// if user requests to logout
if ($my_pligg_base) {
    if (strpos($_GET['return'], $my_pligg_base) !== 0) {
        $_GET['return'] = $my_pligg_base . '/';
    }
    if (strpos($_POST['return'], $my_pligg_base) !== 0) {
        $_POST['return'] = $my_pligg_base . '/';
    }
}
$id = sanitize($_REQUEST['id'], 3);
$n = sanitize($_REQUEST['n'], 3);
$idTemp = base64_decode($id);
$username = sanitize($idTemp, 3);
$sql = "SELECT * FROM `" . table_users . "` where `user_login` = '" . $username . "' AND `last_reset_request` = FROM_UNIXTIME('" . $n . "') AND user_level!='Spammer'";
开发者ID:hyrmedia,项目名称:pligg-cms,代码行数:31,代码来源:recover.php


示例20: fill_smarty

 function fill_smarty($smarty)
 {
     global $current_user, $the_template, $comment_counter, $link, $ranklist, $db;
     if (!$ranklist) {
         $users = $db->get_results("SELECT user_karma, COUNT(*) FROM " . table_users . " WHERE user_level NOT IN ('Spammer') AND user_karma>0 GROUP BY user_karma ORDER BY user_karma DESC", ARRAY_N);
         $ranklist = array();
         $rank = 1;
         if ($users) {
             foreach ($users as $dbuser) {
                 $ranklist[$dbuser[0]] = $rank;
                 $rank += $dbuser[1];
             }
         }
     }
     $smarty->assign('comment_counter', $comment_counter);
     $text = save_text_to_html($this->content);
     $vars = array('comment_text' => $text, 'comment_id' => $this->id, 'smarty' => $smarty);
     check_actions('show_comment_content', $vars);
     $smarty->assign('comment_content', $vars['comment_text']);
     $vars = array('comment_form_label' => '');
     check_actions('comment_form_label', $vars);
     $smarty->assign('comment_form_label', $vars['comment_form_label']);
     $smarty->assign('current_userid', $current_user->user_id);
     $smarty->assign('user_logged_in', $current_user->user_login);
     $vars = array('comment_username' => $this->username(), 'is_anonymous' => 0, 'comment_id' => $this->id);
     check_actions('show_comment_username', $vars);
     $smarty->assign('user_username', $vars['comment_username']);
     $smarty->assign('user_rank', $ranklist[$this->userkarma]);
     $smarty->assign('is_anonymous', $vars['is_anonymous']);
     $smarty->assign('user_extra_fields', $this->extra_field);
     //$smarty->assign('link_submitter', $link->username());
     $smarty->assign('comment_id', $this->id);
     $smarty->assign('comment_status', $this->status);
     $smarty->assign('comment_author', $this->author);
     $smarty->assign('comment_link', $this->link);
     $smarty->assign('user_view_url', getmyurl('user', $this->username));
     $smarty->assign('comment_date_timestamp', $this->date);
     $smarty->assign('comment_date', date('F, d Y g:i A', $this->date));
     $smarty->assign('comment_age', txt_time_diff($this->date));
     $smarty->assign('comment_randkey', $this->randkey);
     $smarty->assign('comment_votes', $this->votes);
     $smarty->assign('comment_parent', $this->parent);
     $smarty->assign('hide_comment_edit', $this->hideedit);
     $this->user_vote_count = $this->votes($current_user->user_id);
     $smarty->assign('comment_user_vote_count', $this->user_vote_count);
     $smarty->assign('comment_shakebox_currentuser_votes', $this->votes($current_user->user_id, '>0'));
     $smarty->assign('comment_shakebox_currentuser_reports', $this->votes($current_user->user_id, '<0'));
     // if the person logged in is the person viewing the comment, show 'you' instead of the name
     $smarty->assign('user_userlogin', $this->username);
     // the url for the edit comment link
     $smarty->assign('edit_comment_url', getmyurl('editcomment', $this->id, $link->id));
     $smarty->assign('delete_comment_url', my_pligg_base . '/delete.php?comment_id=' . $this->id);
     // avatars
     $smarty->assign('UseAvatars', do_we_use_avatars());
     $smarty->assign('Avatar', $avatars = get_avatar('all', '', $this->username, ''));
     $smarty->assign('Avatar_ImgSrc', $avatars['large']);
     $smarty->assign('Avatar_ImgSrc_Small', $avatars['small']);
     // does the person logged in have admin or moderator status?
     $canIhaveAccess = 0;
     $canIhaveAccess = $canIhaveAccess + checklevel('admin');
     $canIhaveAccess = $canIhaveAccess + checklevel('moderator');
     if ($canIhaveAccess == 1) {
         $smarty->assign('isadmin', 1);
     }
     // the link to upvote the comment
     $jslinky = "cvote({$current_user->user_id},{$this->id},{$this->id}," . "'" . md5($current_user->user_id . $this->randkey) . "',10,'" . my_base_url . my_pligg_base . "/')";
     $smarty->assign('link_shakebox_javascript_votey', $jslinky);
     $jslinky = "cunvote({$current_user->user_id},{$this->id},{$this->id}," . "'" . md5($current_user->user_id . $this->randkey) . "',10,'" . my_base_url . my_pligg_base . "/')";
     $smarty->assign('link_shakebox_javascript_unvotey', $jslinky);
     // the link to downvote the comment
     $jslinkn = "cvote({$current_user->user_id},{$this->id},{$this->id}," . "'" . md5($current_user->user_id . $this->randkey) . "',-10,'" . my_base_url . my_pligg_base . "/')";
 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getnamabarang函数代码示例发布时间:2022-05-15
下一篇:
PHP getmyuid函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap