当前位置: 首页>>代码示例>>PHP>>正文


PHP SE_Language类代码示例

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


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

示例1: notify_summary

 function notify_summary()
 {
     global $database, $user;
     $total_notifications = 0;
     $notify_array = array();
     // CHECK THAT USER EXISTS
     if (is_object($user) && $user->user_exists && $user->user_info['user_hasnotifys']) {
         // BUILD NOTIFICATION QUERY
         $notify_query = "\r\n        (\r\n          SELECT \r\n            '0' AS notify_grouped,\r\n            count(se_notifys.notify_id) AS total_notifications, \r\n            se_notifytypes.notifytype_id, \r\n            se_notifytypes.notifytype_desc, \r\n            se_notifytypes.notifytype_icon, \r\n            se_notifytypes.notifytype_url, \r\n            se_notifys.notify_urlvars, \r\n            se_notifys.notify_text \r\n          FROM se_notifys \r\n          LEFT JOIN se_notifytypes \r\n          ON se_notifys.notify_notifytype_id=se_notifytypes.notifytype_id \r\n          WHERE \r\n            notify_user_id='{$user->user_info['user_id']}'\r\n          AND\r\n            notifytype_group=1\r\n          GROUP BY se_notifys.notify_notifytype_id\r\n        ) UNION ALL (\r\n          SELECT \r\n            se_notifys.notify_object_id AS notify_grouped,\r\n            count(se_notifys.notify_id) AS total_notifications, \r\n            se_notifytypes.notifytype_id, \r\n            se_notifytypes.notifytype_desc, \r\n            se_notifytypes.notifytype_icon, \r\n            se_notifytypes.notifytype_url, \r\n            se_notifys.notify_urlvars, \r\n            se_notifys.notify_text \r\n          FROM se_notifys \r\n          LEFT JOIN se_notifytypes \r\n          ON se_notifys.notify_notifytype_id=se_notifytypes.notifytype_id \r\n          WHERE \r\n            notify_user_id='{$user->user_info['user_id']}' \r\n          AND\r\n            notifytype_group=0\r\n          GROUP BY se_notifys.notify_notifytype_id, se_notifys.notify_object_id\r\n        )\r\n      ";
         // GET NOTIFICATIONS
         $notifys = $database->database_query($notify_query);
         while ($notify = $database->database_fetch_assoc($notifys)) {
             // REGISTER PRELOADED TEXT
             SE_Language::_preload($notify['notifytype_desc']);
             // GET URL VARS
             $urlvars = unserialize($notify['notify_urlvars']);
             $notify_url = vsprintf($notify['notifytype_url'], $urlvars);
             // GET DESC TEXT VARS
             $notify_text = unserialize($notify['notify_text']);
             // ADD THIS NOTIFICATION TO OUTPUT ARRAY
             $total_notifications += $notify['total_notifications'];
             $notify_array[] = array('notifytype_id' => $notify['notifytype_id'], 'notify_grouped' => $notify['notify_grouped'], 'notify_icon' => $notify['notifytype_icon'], 'notify_url' => $notify_url, 'notify_desc' => $notify['notifytype_desc'], 'notify_text' => $notify_text, 'notify_total' => $notify['total_notifications']);
         }
     }
     // RETURN LIST OF NOTIFICATIONS
     return array('total' => (int) $total_notifications, 'total_grouped' => (int) count($notify_array), 'notifys' => $notify_array);
 }
开发者ID:amitjoy,项目名称:nitd-network,代码行数:27,代码来源:class_notify.php

示例2: send_systememail

function send_systememail($systememail, $recipient_email, $replace = array(), $bcc = FALSE)
{
    global $setting, $database;
    // RETRIEVE EMAIL INFO
    $email = $database->database_fetch_assoc($database->database_query("SELECT * FROM se_systememails WHERE systememail_name='{$systememail}' LIMIT 1"));
    SE_Language::_preload_multi($email['systememail_subject'], $email['systememail_body']);
    SE_Language::load();
    // GET/DECODE SUBJECT AND MESSAGE
    $subject = htmlspecialchars_decode(SE_Language::_get($email['systememail_subject']), ENT_QUOTES);
    $message = htmlspecialchars_decode(SE_Language::_get($email['systememail_body']), ENT_QUOTES);
    // REPLACE VARIABLES IN SUBJECT AND MESSAGE
    $subject = vsprintf($subject, $replace);
    $message = vsprintf($message, $replace);
    // ENCODE SUBJECT FOR UTF8
    $subject = "=?UTF-8?B?" . base64_encode($subject) . "?=";
    // REPLACE CARRIAGE RETURNS WITH BREAKS
    $message = str_replace("\n", "<br>", $message);
    // SET HEADERS
    $sender = "{$setting['setting_email_fromname']} <{$setting['setting_email_fromemail']}>";
    $headers = "MIME-Version: 1.0" . "\n";
    $headers .= "Content-type: text/html; charset=utf-8" . "\n";
    $headers .= "Content-Transfer-Encoding: 8bit" . "\n";
    $headers .= "From: {$sender}" . "\n";
    $headers .= "Return-Path: {$sender}" . "\n";
    $headers .= "Reply-To: {$sender}\n";
    // IF BCC, SET TO AND BCC
    if ($bcc) {
        $headers .= "Bcc: {$recipient_email}\n";
        $recipient_email = "noreply@domain.com";
    }
    // SEND MAIL
    mail($recipient_email, $subject, $message, $headers);
    return true;
}
开发者ID:rahulsiwal,项目名称:younity,代码行数:34,代码来源:functions_email.php

示例3: search_blog

function search_blog()
{
    global $database, $url, $results_per_page, $p, $search_text, $t, $search_objects, $results, $total_results;
    // CONSTRUCT QUERY
    $sql = "\r\n    SELECT\r\n      se_blogentries.blogentry_id,\r\n      se_blogentries.blogentry_title,\r\n      se_blogentries.blogentry_body,\r\n      se_users.user_id,\r\n      se_users.user_username,\r\n      se_users.user_photo,\r\n      se_users.user_fname,\r\n      se_users.user_lname\r\n    FROM\r\n      se_blogentries,\r\n      se_users,\r\n      se_levels\r\n    WHERE\r\n      se_blogentries.blogentry_user_id=se_users.user_id &&\r\n      se_users.user_level_id=se_levels.level_id &&\r\n      (\r\n        se_blogentries.blogentry_search='1' ||\r\n        se_levels.level_blog_search='0'\r\n      ) \r\n  ";
    $sql .= " && MATCH (`blogentry_title`, `blogentry_body`) AGAINST ('{$search_text}' IN BOOLEAN MODE)";
    /*
    $sql .= " && (
          blogentry_title LIKE '%$search_text%' ||
          blogentry_body LIKE '%$search_text%'
        )
    ";
    */
    // GET TOTAL ENTRIES
    $sql2 = $sql . " LIMIT 201";
    $resource = $database->database_query($sql2);
    $total_entries = $database->database_num_rows($resource);
    // IF NOT TOTAL ONLY
    if ($t == "blog") {
        // MAKE BLOG PAGES
        $start = ($p - 1) * $results_per_page;
        $limit = $results_per_page + 1;
        // SEARCH BLOGS
        $sql3 = $sql . " ORDER BY blogentry_id DESC LIMIT {$start}, {$limit}";
        $resource = $database->database_query($sql3);
        while ($blogentry_info = $database->database_fetch_assoc($resource)) {
            // CREATE AN OBJECT FOR AUTHOR
            $profile = new se_user();
            $profile->user_info['user_id'] = $blogentry_info['user_id'];
            $profile->user_info['user_username'] = $blogentry_info['user_username'];
            $profile->user_info['user_photo'] = $blogentry_info['user_photo'];
            $profile->user_info['user_fname'] = $blogentry_info['user_fname'];
            $profile->user_info['user_lname'] = $blogentry_info['user_lname'];
            $profile->user_displayname();
            // IF EMPTY TITLE
            if (!trim($blogentry_info['blogentry_title'])) {
                $blogentry_info['blogentry_title'] = SE_Language::get(589);
            }
            $blogentry_info['blogentry_body'] = cleanHTML($blogentry_info['blogentry_body'], '');
            // IF BODY IS LONG
            if (strlen($blogentry_info['blogentry_body']) > 150) {
                $blogentry_info['blogentry_body'] = substr($blogentry_info['blogentry_body'], 0, 147) . "...";
            }
            $result_url = $url->url_create('blog_entry', $blogentry_info['user_username'], $blogentry_info['blogentry_id']);
            $result_name = 1500118;
            $result_desc = 1500119;
            $results[] = array('result_url' => $result_url, 'result_icon' => './images/icons/blog_blog48.gif', 'result_name' => $result_name, 'result_name_1' => $blogentry_info['blogentry_title'], 'result_desc' => $result_desc, 'result_desc_1' => $url->url_create('profile', $blogentry_info['user_username']), 'result_desc_2' => $profile->user_displayname, 'result_desc_3' => $blogentry_info['blogentry_body']);
        }
        // SET TOTAL RESULTS
        $total_results = $total_entries;
    }
    // SET ARRAY VALUES
    SE_Language::_preload_multi(1500118, 1500119, 1500120);
    if ($total_albums > 200) {
        $total_albums = "200+";
    }
    $search_objects[] = array('search_type' => 'blog', 'search_lang' => 1500120, 'search_total' => $total_entries);
}
开发者ID:amitjoy,项目名称:nitd-network,代码行数:58,代码来源:functions_blog.php

示例4: send_systememail

function send_systememail($systememail, $recipient_email, $replace = array(), $bcc = FALSE)
{
    global $setting, $database, $setting_smtp_email;
    $setting_email_query = $database->database_query("SELECT * FROM se_settings_email LIMIT 1");
    $setting_smtp_email = $database->database_fetch_assoc($setting_email_query);
    // RETRIEVE EMAIL INFO
    $email = $database->database_fetch_assoc($database->database_query("SELECT * FROM se_systememails WHERE systememail_name='{$systememail}' LIMIT 1"));
    SE_Language::_preload_multi($email['systememail_subject'], $email['systememail_body']);
    SE_Language::load();
    // GET/DECODE SUBJECT AND MESSAGE
    $subject = htmlspecialchars_decode(SE_Language::_get($email['systememail_subject']), ENT_QUOTES);
    $message = htmlspecialchars_decode(SE_Language::_get($email['systememail_body']), ENT_QUOTES);
    // REPLACE VARIABLES IN SUBJECT AND MESSAGE
    $subject = vsprintf($subject, $replace);
    $message = vsprintf($message, $replace);
    // ENCODE SUBJECT FOR UTF8
    $subject = "=?UTF-8?B?" . base64_encode($subject) . "?=";
    // REPLACE CARRIAGE RETURNS WITH BREAKS
    $message = str_replace("\n", "<br>", $message);
    // SET HEADERS
    $sender = "{$setting['setting_email_fromname']} <{$setting['setting_email_fromemail']}>";
    $headers = "MIME-Version: 1.0" . "\n";
    $headers .= "Content-type: text/html; charset=utf-8" . "\n";
    $headers .= "Content-Transfer-Encoding: 8bit" . "\n";
    $headers .= "From: {$sender}" . "\n";
    $headers .= "Return-Path: {$sender}" . "\n";
    $headers .= "Reply-To: {$sender}\n";
    // IF BCC, SET TO AND BCC
    if ($bcc) {
        $headers .= "Bcc: {$recipient_email}\n";
        $recipient_email = "noreply@domain.com";
    }
    // SEND MAIL
    if ($setting_smtp_email['email_method'] == "mail") {
        mail($recipient_email, $subject, $message, $headers);
    } elseif ($setting_smtp_email['email_method'] == "smtp") {
        $mailer = new PHPMailer();
        $mailer->IsSMTP();
        $mailer->Subject = $subject;
        $mailer->From = $setting['setting_email_fromemail'];
        $mailer->FromName = $setting['setting_email_fromname'];
        $mailer->MsgHTML($message);
        $mailer->AddAddress($recipient_email);
        $mailer->Host = $setting_smtp_email['smtp_host'];
        $mailer->Username = $setting_smtp_email['smtp_user'];
        $mailer->Password = $setting_smtp_email['smtp_pass'];
        $mailer->Port = $setting_smtp_email['smtp_port'];
        if ($setting_smtp_email['smtp_port'] == 465) {
            $mailer->SMTPSecure = "ssl";
        } else {
            $mailer->SMTPSecure = "";
        }
        $mailer->Send();
    }
    return true;
}
开发者ID:amitjoy,项目名称:nitd-network,代码行数:56,代码来源:functions_email.php

示例5: search_poll

function search_poll()
{
    global $database, $url, $results_per_page, $p, $search_text, $t, $search_objects, $results, $total_results;
    // CONSTRUCT QUERY
    $sql = "\r\n    SELECT\r\n      se_polls.poll_id,\r\n      se_polls.poll_title,\r\n      se_users.user_id,\r\n      se_users.user_username,\r\n      se_users.user_photo,\r\n      se_users.user_fname,\r\n      se_users.user_lname\r\n    FROM\r\n      se_polls,\r\n      se_users,\r\n      se_levels\r\n    WHERE\r\n      se_polls.poll_user_id=se_users.user_id &&\r\n      se_users.user_level_id=se_levels.level_id &&\r\n      (\r\n        se_polls.poll_search='1' ||\r\n        se_levels.level_poll_search='0'\r\n      ) &&\r\n      (\r\n        poll_title LIKE '%{$search_text}%' ||\r\n        poll_desc LIKE '%{$search_text}%' ||\r\n        poll_options LIKE '%{$search_text}%'\r\n      )\r\n  ";
    // GET TOTAL ENTRIES
    $total_polls = $database->database_num_rows($database->database_query($sql . " LIMIT 201"));
    // IF NOT TOTAL ONLY
    if ($t == "poll") {
        // MAKE POLL PAGES
        $start = ($p - 1) * $results_per_page;
        $limit = $results_per_page + 1;
        // SEARCH POLLS
        $sql .= " ORDER BY se_polls.poll_id DESC LIMIT {$start}, {$limit}";
        $resource = $database->database_query($sql) or die($database->database_error());
        while ($poll_info = $database->database_fetch_assoc($resource)) {
            // CREATE AN OBJECT FOR AUTHOR
            $profile = new se_user();
            $profile->user_info['user_id'] = $poll_info['user_id'];
            $profile->user_info['user_username'] = $poll_info['user_username'];
            $profile->user_info['user_fname'] = $poll_info['user_fname'];
            $profile->user_info['user_lname'] = $poll_info['user_lname'];
            $profile->user_info['user_photo'] = $poll_info['user_photo'];
            $profile->user_displayname();
            $result_url = $url->url_create('poll', $poll_info['user_username'], $poll_info['poll_id']);
            $result_name = 2500112;
            $result_desc = 2500113;
            // IF EMPTY TITLE
            if (!trim($poll_info['poll_title'])) {
                SE_Language::_preload(589);
                SE_Language::load();
                $poll_info['poll_title'] = SE_Language::_get(589);
            }
            $results[] = array('result_url' => $result_url, 'result_icon' => './images/icons/poll_poll48.gif', 'result_name' => $result_name, 'result_name_1' => $poll_info['poll_title'], 'result_desc' => $result_desc, 'result_desc_1' => $url->url_create('profile', $profile->user_info['user_username']), 'result_desc_2' => $profile->user_displayname, 'result_desc_3' => $poll_info['poll_desc']);
        }
        // SET TOTAL RESULTS
        $total_results = $total_polls;
    }
    // SET ARRAY VALUES
    SE_Language::_preload_multi(2500111, 2500112, 2500113);
    if ($total_polls > 200) {
        $total_polls = "200+";
    }
    $search_objects[] = array('search_type' => 'poll', 'search_lang' => 2500111, 'search_total' => $total_polls);
}
开发者ID:amitjoy,项目名称:nitd-network,代码行数:45,代码来源:functions_poll.php

示例6: search_documents

function search_documents()
{
    global $database, $url, $results_per_page, $p, $search_text, $t, $search_objects, $results, $total_results;
    // START TO QUERY BUILD
    $sql = "\r\n    SELECT\r\n      se_documents.document_id,\r\n      se_documents.document_title,\r\n      se_documents.document_slug,\r\n      se_documents.document_description,\r\n      se_users.user_id,\r\n      se_users.user_username,\r\n      se_users.user_photo,\r\n      se_users.user_fname,\r\n      se_users.user_lname\r\n    FROM\r\n      se_documents \r\n      INNER JOIN \r\n       se_users \r\n       ON se_documents.document_user_id=se_users.user_id\r\n      INNER JOIN\r\n       se_levels\r\n      ON se_users.user_level_id=se_levels.level_id \r\n      LEFT JOIN\r\n\t       se_document_tags\r\n\t       ON se_documents.document_id = se_document_tags.document_id\r\n\t    LEFT JOIN se_documenttags\r\n\t       ON se_document_tags.tag_id = se_documenttags.id  \r\n    WHERE\r\n\r\n      (\r\n        se_documents.document_search='1' ||\r\n        se_levels.level_document_search='0'\r\n      ) &&\r\n      (\r\n        document_title LIKE '%{$search_text}%' ||\r\n        document_description LIKE '%{$search_text}%' ||\r\n        document_fulltext LIKE '%{$search_text}%' ||\r\n        tag_name LIKE '%{$search_text}%'\r\n      )\r\n      &&\r\n      (\r\n        se_documents.document_approved='1'\r\n      )\r\n      &&\r\n      (\r\n        se_documents.document_publish='1'\r\n      )\r\n      &&\r\n      (\r\n        se_documents.document_status='1'\r\n      )\r\n     GROUP BY se_documents.document_id \r\n  ";
    // GET TOTAL DOCUMNETS
    $total_documents = $database->database_num_rows($database->database_query($sql . " LIMIT 201"));
    // IF NOT TOTAL ONLY
    if ($t == "document") {
        //  DOCUMENTS PAGES
        $start = ($p - 1) * $results_per_page;
        $limit = $results_per_page + 1;
        // SEARCH DOCUMENTS
        $sql .= " ORDER BY se_documents.document_id DESC LIMIT {$start}, {$limit}";
        $resource = $database->database_query($sql) or die($database->database_error());
        while ($document_info = $database->database_fetch_assoc($resource)) {
            // CREATE AN OBJECT FOR AUTHOR
            $profile = new se_user();
            $profile->user_info['user_id'] = $document_info['user_id'];
            $profile->user_info['user_username'] = $document_info['user_username'];
            $profile->user_info['user_fname'] = $document_info['user_fname'];
            $profile->user_info['user_lname'] = $document_info['user_lname'];
            $profile->user_info['user_photo'] = $document_info['user_photo'];
            $profile->user_displayname();
            $result_url = $url->url_create("document", $document_info['user_username'], $document_info['document_id'], $document_info['document_slug']);
            $result_name = 650003007;
            $result_desc = 650003008;
            $results[] = array('result_url' => $result_url, 'result_icon' => './images/icons/document60.gif', 'result_name' => $result_name, 'result_name_1' => $document_info['document_title'], 'result_desc' => $result_desc, 'result_desc_1' => $url->url_create('profile', $profile->user_info['user_username']), 'result_desc_2' => $profile->user_displayname, 'result_desc_3' => $document_info['document_description']);
        }
        // SET TOTAL RESULTS
        $total_results = $total_documents;
    }
    // SET ARRAY VALUES
    SE_Language::_preload_multi(650003009, 650003007, 650003008);
    if ($total_documents > 200) {
        $total_documents = "200+";
    }
    $search_objects[] = array('search_type' => 'document', 'search_lang' => 650003009, 'search_total' => $total_documents);
}
开发者ID:amitjoy,项目名称:nitd-network,代码行数:39,代码来源:functions_document.php

示例7: array

<?php

// ENSURE THIS IS BEING INCLUDED IN AN SE SCRIPT
if (!defined('SE_PAGE')) {
    exit;
}
//include_once "./lang/lang_".$global_lang."_education.php";
include_once "./include/class_radcodes.php";
include_once "./include/class_education.php";
include_once "./include/functions_education.php";
SE_Language::_preload_multi(11040101, 11040102, 11040103);
SE_Language::load();
// SET MAIN MENU VARS
//$plugin_vars[menu_main] = Array('file' => 'search_education.php', 'title' => 11020106);
// SET USER MENU VARS
if ($user->level_info[level_education_allow] == 1) {
    $plugin_vars[menu_user] = array('file' => 'user_education.php', 'icon' => 'education16.gif', 'title' => 11040102);
}
// SET PROFILE MENU VARS
if ($owner->level_info[level_education_allow] == 1 && $page == "profile") {
    $rc_education = new rc_education($owner->user_info[user_id]);
    $educations = $rc_education->get_educations();
    $educations = $rc_education->build_searchable_fields($educations);
    $total_educations = count($educations);
    $smarty->assign('educations', $educations);
    $smarty->assign('total_educations', $total_educations);
    // SET PROFILE MENU VARS
    if ($total_educations > 0) {
        // DETERMINE WHERE TO SHOW ALBUMS
        $level_education_profile = explode(",", $owner->level_info[level_education_profile]);
        if (!in_array($owner->user_info[user_profile_education], $level_education_profile)) {
开发者ID:amitjoy,项目名称:nitd-network,代码行数:31,代码来源:header_education.php

示例8: comment_post

 function comment_post($comment_body, $comment_secure, $object_title = "", $object_owner = "", $object_owner_id = 0, $object_privacy = "")
 {
     global $database, $user, $owner, $setting, $actions, $notify, $url;
     $comment_id = 0;
     $comment_date = time();
     // RETRIEVE AND CHECK SECURITY CODE IF NECESSARY
     if ($setting['setting_comment_code']) {
         // NOW IN HEADER
         $code_found = false;
         if (@$_SESSION['code'] == $comment_secure) {
             $code_found = true;
         }
         if (!empty($_SESSION['codes']) && is_array($_SESSION['codes'])) {
             foreach ($_SESSION['codes'] as $index => $code_info) {
                 if ($code_info['code'] == $comment_secure) {
                     $code_found = true;
                     unset($_SESSION['codes'][$index]);
                 }
             }
         }
         if (!$code_found) {
             $this->is_error = 1;
         }
         //session_start();
         //$code = $_SESSION['code'];
         //if($code == "") { $code = randomcode(); }
         //if($comment_secure != $code) { $this->is_error = 1; }
     }
     // MAKE SURE COMMENT BODY IS NOT EMPTY - ADD BREAKS AND CENSOR
     $comment_body = cleanHTML(censor($comment_body), $setting['setting_comment_html'], array("style"));
     $comment_body = preg_replace('/(\\r\\n?)/', "\n", $comment_body);
     $comment_body = str_replace("\n", "<br>", $comment_body);
     $comment_body = preg_replace('/(<br>){3,}/is', '<br><br>', $comment_body);
     $comment_body = str_replace("'", "\\'", $comment_body);
     if (!trim($comment_body)) {
         $this->is_error = 1;
         $comment_body = "";
     }
     // ADD COMMENT IF NO ERROR
     if (!$this->is_error) {
         $resource = $database->database_query("\r\n        INSERT INTO `se_{$this->comment_type}comments` (\r\n          `{$this->comment_type}comment_{$this->comment_identifier}`,\r\n          `{$this->comment_type}comment_authoruser_id`,\r\n          `{$this->comment_type}comment_date`,\r\n          `{$this->comment_type}comment_body`\r\n        ) VALUES (\r\n          '{$this->comment_identifying_value}',\r\n          '{$user->user_info['user_id']}',\r\n          '{$comment_date}',\r\n          '{$comment_body}'\r\n        )\r\n      ");
         $comment_id = $database->database_insert_id();
         // New handling - total cached in parent table
         if ($resource && $this->comment_parent_type && $this->comment_parent_identifier) {
             $database->database_query("\r\n          UPDATE\r\n            `se_{$this->comment_parent_type}`\r\n          SET\r\n            `{$this->comment_parent_identifier}_totalcomments`=`{$this->comment_parent_identifier}_totalcomments`+1\r\n          WHERE\r\n            `{$this->comment_identifier}`='{$this->comment_identifying_value}'\r\n          LIMIT\r\n            1\r\n        ");
         }
         // INSERT ACTION IF USER EXISTS
         if ($user->user_exists) {
             $commenter = $user->user_displayname;
             $comment_body_encoded = strip_tags($comment_body);
             if (strlen($comment_body_encoded) > 250) {
                 $comment_body_encoded = substr($comment_body_encoded, 0, 247) . "...";
             }
             $comment_body_encoded = str_replace(array("<br>", "<br />"), " ", $comment_body_encoded);
             $actions->actions_add($user, $this->comment_type . "comment", array($user->user_info['user_username'], $user->user_displayname, $owner->user_info['user_username'], $owner->user_displayname, $comment_body_encoded, $this->comment_identifying_value, $object_title, $object_owner_id), array(), 0, false, $object_owner, $object_owner_id, $object_privacy);
         } else {
             SE_Language::_preload(835);
             SE_Language::load();
             $commenter = SE_Language::_get(835);
         }
         // SEND PROFILE COMMENT NOTIFICATION IF COMMENTER IS NOT OWNER
         if ($owner->user_info['user_id'] != $user->user_info['user_id']) {
             $notifytype = $notify->notify_add($owner->user_info['user_id'], $this->comment_type . "comment", $this->comment_identifying_value, array($owner->user_info['user_username'], $this->comment_identifying_value, $object_owner_id), array($object_title));
             $object_url = $url->url_base . vsprintf($notifytype['notifytype_url'], array($owner->user_info['user_username'], $this->comment_identifying_value));
             $owner->user_settings();
             if ($owner->usersetting_info['usersetting_notify_' . $this->comment_type . 'comment']) {
                 send_systememail($this->comment_type . "comment", $owner->user_info['user_email'], array($owner->user_displayname, $commenter, "<a href=\"{$object_url}\">{$object_url}</a>"));
             }
         }
     }
     return array('comment_id' => $comment_id, 'comment_body' => $comment_body, 'comment_date' => $comment_date);
 }
开发者ID:amitjoy,项目名称:nitd-network,代码行数:72,代码来源:class_comment.php

示例9: array

    // AN ERROR OCCURED SEND THE DATA BACK
    $blogentry_info = array('blogentry_id' => $blogentry_id, 'blogentry_title' => $blogentry_title, 'blogentry_body' => $blogentry_body, 'blogentry_blogentrycat_id' => $blogentry_blogentrycat_id, 'blogentry_search' => $blogentry_search, 'blogentry_privacy' => $blogentry_privacy, 'blogentry_comments' => $blogentry_comments, 'blogentry_trackbacks' => $blogentry_trackbacks);
}
// GET BLOG ENTRY CATEGORIES
$blogentrycats_array = $blog->blog_category_list($user->user_info['user_id']);
// GET PREVIOUS PRIVACY SETTINGS
$level_blog_privacy = unserialize($user->level_info['level_blog_privacy']);
rsort($level_blog_privacy);
for ($c = 0; $c < count($level_blog_privacy); $c++) {
    $lvar = user_privacy_levels($level_blog_privacy[$c]);
    if ($lvar) {
        SE_Language::_preload($privacy_options[$level_blog_privacy[$c]] = $lvar);
    }
}
$level_blog_comments = unserialize($user->level_info['level_blog_comments']);
rsort($level_blog_comments);
for ($c = 0; $c < count($level_blog_comments); $c++) {
    $lvar = user_privacy_levels($level_blog_comments[$c]);
    if ($lvar) {
        SE_Language::_preload($comment_options[$level_blog_comments[$c]] = $lvar);
    }
}
// CONVERT HTML CHARACTERS BACK
$blogentry_info['blogentry_body'] = str_replace("\r\n", "", htmlspecialchars_decode($blogentry_info['blogentry_body']));
// ASSIGN VARIABLES AND SHOW NEW BLOGENTRY PAGE
$smarty->assign('blogentry_info', $blogentry_info);
$smarty->assign('blogentrycats', $blogentrycats_array);
$smarty->assign('privacy_options', $privacy_options);
$smarty->assign('comment_options', $comment_options);
$smarty->assign('comments_total', $comments_total);
include "footer.php";
开发者ID:amitjoy,项目名称:nitd-network,代码行数:31,代码来源:user_blog_entry.php

示例10: defined

<?php

// ENSURE THIS IS BEING INCLUDED IN AN SE SCRIPT
defined('SE_PAGE') or exit;
// INCLUDE GROUP FILES
include "./include/class_group.php";
include "./include/functions_group.php";
// PRELOAD LANGUAGE
SE_Language::_preload(2000007);
// SET MENU VARS
if ($user->user_exists && (int) $user->level_info['level_group_allow'] & 1 || !$user->user_exists && $setting['setting_permission_group']) {
    $plugin_vars['menu_main'] = array('file' => 'browse_groups.php', 'title' => 2000007);
}
if ((int) $user->level_info['level_group_allow'] & 2) {
    $plugin_vars['menu_user'] = array('file' => 'user_group.php', 'icon' => 'group_group16.gif', 'title' => 2000007);
}
// SET WHAT'S NEW PAGE UPDATES
if ($user->level_info['level_group_allow'] & 1 && $page == "user_home") {
    // GET GROUP SUBSCRIPTIONS
    $group_subscribes = array();
    $group_subscribe_query = $database->database_query("SELECT se_groupsubscribes.groupsubscribe_time, se_groups.group_id, se_groups.group_title, count(se_groupcomments.groupcomment_id) AS total_comments FROM se_groupsubscribes LEFT JOIN se_groups ON se_groupsubscribes.groupsubscribe_group_id=se_groups.group_id LEFT JOIN se_groupcomments ON se_groups.group_id=se_groupcomments.groupcomment_group_id AND se_groupcomments.groupcomment_date>se_groupsubscribes.groupsubscribe_time WHERE se_groupsubscribes.groupsubscribe_user_id='{$user->user_info['user_id']}' GROUP BY se_groups.group_id ORDER BY se_groups.group_title");
    $total_group_subscribes = $database->database_num_rows($group_subscribe_query);
    while ($subscribe_info = $database->database_fetch_assoc($group_subscribe_query)) {
        $subscribe_info['total_photos'] = $database->database_num_rows($database->database_query("SELECT NULL FROM se_groupmedia INNER JOIN se_groupalbums ON se_groupmedia.groupmedia_groupalbum_id=se_groupalbums.groupalbum_id AND se_groupalbums.groupalbum_group_id='{$subscribe_info['group_id']}' WHERE se_groupmedia.groupmedia_date>'{$subscribe_info['groupsubscribe_time']}'"));
        $subscribe_info['total_posts'] = $database->database_num_rows($database->database_query("SELECT NULL FROM se_groupposts INNER JOIN se_grouptopics ON se_groupposts.grouppost_grouptopic_id=se_grouptopics.grouptopic_id AND se_grouptopics.grouptopic_group_id='{$subscribe_info['group_id']}' WHERE se_groupposts.grouppost_date>'{$subscribe_info['groupsubscribe_time']}'"));
        $group_subscribes[] = $subscribe_info;
    }
    // ASSIGN GROUP SUBSCRIPTION SMARY VARIABLE
    $smarty->assign('group_subscribes', $group_subscribes);
    $smarty->assign('total_group_subscribes', $total_group_subscribes);
    // SET PROFILE MENU VARS
开发者ID:amitjoy,项目名称:nitd-network,代码行数:31,代码来源:header_group.php

示例11: defined

<?php

// ENSURE THIS IS BEING INCLUDED IN AN SE SCRIPT
defined('SE_PAGE') or exit;
// INCLUDE FUNCTION FILE
include_once "./include/functions_document.php";
// INCLUDE CLASS FILE
include_once "./include/class_document.php";
// PRELOAD LANGUAGE
SE_Language::_preload(650003010);
$query = "SELECT * FROM se_document_parameters";
$params = $database->database_fetch_assoc($database->database_query($query));
// SET MAIN MENU VARS
if (!$user->user_exists && $params[permission_document] || $user->user_exists && $user->level_info['level_document_allow']) {
    $plugin_vars['menu_main'] = array('file' => 'browse_documents.php', 'title' => 650003010);
}
// SET USER MENU VARS
if ($user->user_exists && $user->level_info['level_document_allow']) {
    $plugin_vars[menu_user] = array('file' => 'user_documents.php', 'icon' => 'document16.gif', 'title' => 650003010);
}
// SET PROFILE MENU VARS
if ($owner->level_info['level_document_allow'] && $page == "profile") {
    //SHOWING A DOCUMENT TAB IF THE USER HAS ATLEAST ONE DOCUMENT
    if ($page == "profile") {
        if (isset($_POST['p'])) {
            $p = $_POST['p'];
        } elseif (isset($_GET['p'])) {
            $p = $_GET['p'];
        } else {
            $p = 1;
        }
开发者ID:amitjoy,项目名称:nitd-network,代码行数:31,代码来源:header_document.php

示例12: setcookie

        $database->database_query("UPDATE se_users SET user_language_id='{$user->user_info['user_language_id']}' WHERE user_id='{$user->user_info['user_id']}' LIMIT 1");
    }
    if (!$user->user_exists && $setting['setting_lang_anonymous']) {
        $lang_id = (int) $_GET['lang_id'];
    }
    if ($lang_id) {
        setcookie('se_language_anonymous', $lang_id, time() + 99999999, "/");
        $_COOKIE['se_language_anonymous'] = $lang_id;
    }
}
SE_Language::select($user);
if (SE_Language::info('language_setlocale')) {
    $multi_language = 1;
    setlocale(LC_TIME, SE_Language::info('language_setlocale'));
}
header("Content-Language: " . SE_Language::info('language_code'));
// CREATE ACTIONS CLASS
$actions = new se_actions();
// CREATE NOTIFICATION CLASS
$notify = new se_notify();
// CREATE ADS CLASS
$ads = new se_ads();
// Define SE_PAGE_AJAX in your page before the header include to not load ads or update page views
if (!defined('SE_PAGE_AJAX') && ($page == "chat_frame" || $page == "chat_ajax" || $page == "misc_js" || $page == "ad")) {
    define('SE_PAGE_AJAX', TRUE);
}
if (!defined('SE_PAGE_AJAX')) {
    // UPDATE STATS TABLE
    update_stats("views");
    // LOAD ADS
    $ads->load();
开发者ID:amitjoy,项目名称:nitd-network,代码行数:31,代码来源:header.php

示例13: exit

<?

// ENSURE THIS IS BEING INCLUDED IN AN SE SCRIPT
if(!defined('SE_PAGE')) {
 exit();
}

// PRELOAD LANGUAGE
SE_Language::_preload_multi(17001000, 17001035);

switch($page) {

 // CODE FOR USER HOME PAGE
 case "user_home":
 // your code goes here
  break;
}

header("Content-Type: text/html; charset=utf-8");

class FileLogger {

 private $filehandler;
 private $logname;
 public $buffer = array();

 public function __construct($logname, $filename) {
  $this->logname = $logname;
  $this->filehandler = fopen($filename, "a+");
 }
开发者ID:amitjoy,项目名称:nitd-network,代码行数:30,代码来源:header_feedback.php

示例14: site_statistics

function site_statistics()
{
    global $setting, $database, $database_name;
    $statistics = NULL;
    // CACHING
    $cache_object = SECache::getInstance('serial');
    if (is_object($cache_object)) {
        $statistics = $cache_object->get('site_statistics');
    }
    // RETRIEVAL
    //if( !is_array($statistics) || empty($statistics) )
    if (!is_array($statistics)) {
        $statistics = array();
        // Get default stats
        $total_members = $database->database_fetch_assoc($database->database_query("SELECT count(*) AS total_members FROM se_users"));
        $statistics['members'] = array('title' => 661, 'stat' => (int) (isset($total_members['total_members']) ? $total_members['total_members'] : 0));
        if ($setting['setting_connection_allow']) {
            $total_friends = $database->database_fetch_assoc($database->database_query("SELECT count(*) AS total_friends FROM se_friends WHERE friend_status='1'"));
            $statistics['friends'] = array('title' => 662, 'stat' => (int) (isset($total_friends['total_friends']) ? $total_friends['total_friends'] : 0));
        }
        $total_comments = 0;
        $comment_tables = $database->database_query("SHOW TABLES FROM `{$database_name}` LIKE 'se_%comments'");
        while ($table_info = $database->database_fetch_array($comment_tables)) {
            $comment_type = strrev(substr(strrev(substr($table_info[0], 3)), 8));
            $table_comments = $database->database_fetch_assoc($database->database_query("SELECT count(*) AS total_comments FROM `se_{$comment_type}comments`"));
            $total_comments += $table_comments['total_comments'];
        }
        $statistics['comments'] = array('title' => 663, 'stat' => (int) $total_comments);
        /*
        $total_media = 0;
        $media_tables = $database->database_query("SHOW TABLES FROM `{$database_name}` LIKE 'se_%media'");
        while($table_info = $database->database_fetch_array($media_tables))
        {
          $comment_type = strrev(substr(strrev(substr($table_info[0], 3)), 8));
          $table_media = $database->database_fetch_assoc($database->database_query("SELECT count(*) AS total_media FROM se_{$comment_type}media"));
          $total_media += $total_media['total_media'];
        }
        
        $statistics['media'] = array(
          'title' => 663, // TODO
          'stat'  => (int) $total_media
        );
        */
        /*
        $total_mediatags = 0;
        $mediatag_tables = $database->database_query("SHOW TABLES FROM `{$database_name}` LIKE 'se_%mediatags'");
        while($table_info = $database->database_fetch_array($media_tables))
        {
          $comment_type = strrev(substr(strrev(substr($table_info[0], 3)), 8));
          $table_mediatags = $database->database_fetch_assoc($database->database_query("SELECT count(*) AS total_mediatags FROM se_{$comment_type}mediatags"));
          $total_mediatags += $total_mediatags['total_mediatags'];
        }
        
        $statistics['mediatags'] = array(
          'title' => 663, // TODO
          'stat'  => (int) $total_mediatags
        );
        */
        // CALL HOOK
        // COMMENT OUT THIS NEXT LINE IF YOU ONLY WANT THE BASIC STATISTICS
        ($hook = SE_Hook::exists('se_site_statistics')) ? SE_Hook::call($hook, array('statistics' => &$statistics)) : NULL;
        // CACHE
        if (is_object($cache_object)) {
            $cache_object->store($statistics, 'site_statistics');
        }
    }
    // Load language
    foreach ($statistics as $stat) {
        SE_Language::_preload($stat['title']);
    }
    return $statistics;
}
开发者ID:amitjoy,项目名称:nitd-network,代码行数:72,代码来源:functions_general.php

示例15: while

$total_comments = 0;
$comment_tables = $database->database_query("SHOW TABLES FROM `{$database_name}` LIKE 'se_%comments'");
while ($table_info = $database->database_fetch_array($comment_tables)) {
    $comment_type = strrev(substr(strrev(substr($table_info[0], 3)), 8));
    $table_comments = $database->database_fetch_assoc($database->database_query("SELECT count(*) AS total_comments FROM se_" . $comment_type . "comments WHERE " . $comment_type . "comment_authoruser_id='" . $user->user_info[user_id] . "'"));
    $total_comments += $table_comments[total_comments];
}
// GET USER LEVEL ARRAY
$levels = $database->database_query("SELECT level_id, level_name FROM se_levels ORDER BY level_name");
while ($level_info = $database->database_fetch_assoc($levels)) {
    $level_array[] = $level_info;
}
// GET PROFILECAT ARRAY
$cats = $database->database_query("SELECT profilecat_id AS cat_id, profilecat_title AS cat_title FROM se_profilecats WHERE profilecat_dependency='0' ORDER BY profilecat_order");
while ($cat_info = $database->database_fetch_assoc($cats)) {
    SE_Language::_preload($cat_info[cat_title]);
    $cat_array[] = $cat_info;
}
// GET RECENT ACTIVITY (ACTIONS)
$owner = $user;
$actions = new se_actions();
$actions = $actions->actions_display(0, $setting[setting_actions_actionsonprofile], "se_actions.action_user_id='" . $user->user_info[user_id] . "'");
// ASSIGN VARIABLES AND SHOW EDIT USERS PAGE
$smarty->assign('is_error', $is_error);
$smarty->assign('result', $result);
$smarty->assign('user', $user);
$smarty->assign('levels', $level_array);
$smarty->assign('cats', $cat_array);
$smarty->assign('actions', $actions);
$smarty->assign('old_subnet_name', $subnet[2]);
$smarty->assign('new_subnet_name', $subnet[1]);
开发者ID:rahulsiwal,项目名称:younity,代码行数:31,代码来源:admin_viewusers_edit.php


注:本文中的SE_Language类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。