if ($page_type == 'static') {
                 echo "\t\t\t\t\t\t\t<li><a href=\"" . $site_url . "admin/?s=publish&amp;m=static&amp;x={$page_name}&amp;edit={$page_id}\" title=\"" . $lang['edit'] . "{$page_display_name} " . $lang['page'] . "\" >" . $lang['edit'] . "{$page_display_name} " . $lang['page'] . "</a></li>\n";
             }
             extract(safe_row('*', 'pixie_core', "page_type = 'module' order by page_id desc limit 0,1"));
             if ($page_type == 'module' && $page_name != 'contact') {
                 echo "\t\t\t\t\t\t\t<li><a href=\"" . $site_url . "admin/?s=publish&amp;m=module&amp;x={$page_name}&amp;go=new\" title=\"" . $lang['new_entry'] . "{$page_display_name} " . $lang['entry'] . "\" >" . $lang['new_entry'] . "{$page_display_name} " . $lang['entry'] . "</a></li>\n";
             }
         }
         echo "\t\t\t\t\t\t\t<li class=\"linkspixie\"><a href=\"http://www.getpixie.co.uk/blog/\" title=\"Pixie " . $lang['blog'] . "\" target=\"_blank\">Pixie " . $lang['blog'] . "</a></li>\n";
         echo "\t\t\t\t\t\t\t<li><a href=\"http://www.getpixie.co.uk/forums/\" title=\"Pixie " . $lang['forums'] . "\" target=\"_blank\">Pixie " . $lang['forums'] . "</a></li>\n";
         echo "\t\t\t\t\t\t\t<li><a href=\"http://www.getpixie.co.uk/downloads/\" title=\"Pixie " . $lang['downloads'] . "\" target=\"_blank\">Pixie " . $lang['downloads'] . "</a></li>\n\t\t\t\t\t\t</ul>\n";
     }
     echo "\t\t\t\t\t</div>\n";
     extract($rs);
     echo "\t\t\t\t\t<div class=\"admin_block\" id=\"admin_block_my_links\">";
     echo "\n\t\t\t\t\t\t<h3 class=\"plinks\">" . firstword($GLOBALS['pixie_real_name']) . "'s " . $lang['links'] . "</h3>\n\t\t\t\t\t\t<ul>\n";
     echo "\t\t\t\t\t\t\t<li><a href=\"{$link_1}\" title=\"Visit {$link_1}\" target=\"_blank\">" . str_replace('http://', "", $link_1) . "</a></li>\n";
     echo "\t\t\t\t\t\t\t<li><a href=\"{$link_2}\" title=\"Visit {$link_2}\" target=\"_blank\">" . str_replace('http://', "", $link_2) . "</a></li>\n";
     echo "\t\t\t\t\t\t\t<li><a href=\"{$link_3}\" title=\"Visit {$link_3}\" target=\"_blank\">" . str_replace('http://', "", $link_3) . "</a></li>\n";
     echo "\t\t\t\t\t\t</ul>\n";
     echo "\t\t\t\t\t</div>\n";
     echo "\t\t\t\t</div>";
 }
 if ($m) {
     $m = preg_replace('[^A-Za-z0-9]', "", $m);
     include "../admin/modules/{$m}.php";
 } else {
     if ($x) {
         /* Was : */
         /* $x = ereg_replace('[^A-Za-z0-9]', "", $x); */
         /* But ereg_replace() is depreciated. */
Exemple #2
0
 /* Create a sha1 checksum to help verify that we are only sending the mail once */
 $_SESSION['FORM_SECRET'] = $secret;
 /* FORM_SECRET in $_SESSION['FORM_SECRET'] must be unique if you reuse this technique in other forms like the comments form for example */
 $sets = safe_row('*', 'pixie_module_contact_settings', "contact_id='1'");
 /* Get the settings for this page */
 extract($sets);
 /* Extract them */
 echo '<h3>Contact</h3>';
 if (isset($show_profile_information)) {
     if ($show_profile_information == 'yes') {
         $rs = safe_rows_start('*', 'pixie_users', '1 order by privs desc');
         while ($a = nextRow($rs)) {
             extract($a);
             echo "\r\n\t\t\t\t\t<div class=\"vcard\">\r\n\t\t\t\t\t\t<a class=\"url fn\" href=\"{$website}\"><span class=\"given-name\">";
             if (isset($realname)) {
                 echo firstword($realname);
             }
             echo "</span><span class=\"family-name\"> ";
             if (isset($realname)) {
                 echo lastword($realname);
             }
             echo "</span></a>\r\n\t\t\t\t\t\t<div class=\"org hide\">{$occupation}</div>\r\n\t\t\t\t\t\t<div class=\"adr\">\r\n\t\t\t\t\t\t\t<span class=\"street-address\">{$street}</span> \r\n\t\t\t\t\t\t\t<span class=\"locality\">{$town}</span>\r\n\t\t\t\t\t\t\t<span class=\"region\">{$county}</span> \r\n\t\t\t\t\t\t\t<span class=\"country-name\">{$country}</span>\r\n\t\t\t\t\t\t\t<span class=\"postal-code\">{$post_code}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<span class=\"tel\">{$telephone}</span>";
             if ($show_vcard_link == 'yes') {
                 if (isset($s)) {
                     echo "<p class=\"extras\"><span class=\"down_vcard\"><a href=\"http://technorati.com/contacts/" . createURL($s) . "\">Download my vCard</a></span></p>";
                 }
             }
             echo "\r\n\t\t\t\t\t</div>";
         }
     }
 }
function build_head()
{
    global $site_url, $date_format;
    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) {
            $privs = safe_field('privs', 'pixie_users', "user_name='{$username}'");
            $realname = safe_field('realname', 'pixie_users', "user_name='{$username}'");
            $GLOBALS['pixie_user'] = $username;
            $user_count = mysql_num_rows(safe_query('select * from ' . PFX . 'pixie_log_users_online'));
            $user_count = $user_count - 1;
            echo "<div id=\"admin_header\">\n\t\t<h1>Hello ";
            if (isset($realname)) {
                echo firstword($realname);
            }
            echo "</h1>\n\t\t<div id=\"admin_header_text\"><p>" . safe_strftime($date_format, time() + tz_offset()) . ". Currently your site has {$user_count} visitor(s) online.</p></div>\n\t\t<div id=\"admin_header_controls\"><p><a href=\"" . $site_url . "admin/\" title=\"Goto Pixie\">Pixie</a><a href=\"" . $site_url . "admin/?s=logout&amp;tool=home\" title=\"Logout of pixie\">Logout</a></p></div>\n\t</div>\n";
            /* Needs language */
        }
    }
}