本文整理汇总了PHP中SE_Language::_preload_multi方法的典型用法代码示例。如果您正苦于以下问题:PHP SE_Language::_preload_multi方法的具体用法?PHP SE_Language::_preload_multi怎么用?PHP SE_Language::_preload_multi使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SE_Language
的用法示例。
在下文中一共展示了SE_Language::_preload_multi方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: 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);
}
示例3: 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;
}
示例4: 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);
}
示例5: 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);
}
示例6: forum_list
function forum_list($cat_id = 0)
{
global $database, $user;
// SET LEVEL ID
if ($user->user_exists) {
$level_id = $user->level_info[level_id];
} else {
$level_id = 0;
}
// GET FORUM CATEGORIES
if ($cat_id == 0) {
$sql = "SELECT * FROM se_forumcats ORDER BY forumcat_order";
} else {
$sql = "SELECT * FROM se_forumcats WHERE cat_id='{$cat_id}'";
}
$forumcats = $database->database_query($sql);
while ($forumcat_info = $database->database_fetch_assoc($forumcats)) {
// GET FORUMS
$forum_array = array();
$forums = $database->database_query("SELECT * FROM se_forums WHERE forum_forumcat_id='{$forumcat_info['forumcat_id']}' ORDER BY forum_order");
while ($forum_info = $database->database_fetch_assoc($forums)) {
$show_forum = false;
if ($database->database_num_rows($database->database_query("SELECT NULL FROM se_forumlevels WHERE forumlevel_forum_id='{$forum_info['forum_id']}' AND forumlevel_level_id='{$level_id}'")) == 1) {
$show_forum = true;
} elseif ($user->user_exists && $this->forum_is_moderator($user->user_info[user_id], $forum_info[forum_id])) {
$show_forum = true;
}
if ($show_forum) {
SE_Language::_preload_multi($forum_info[forum_title], $forum_info[forum_desc]);
// GET MODERATORS
$mod_array = array();
$mod_array_id = array();
$mods = $database->database_query("SELECT se_users.user_id, se_users.user_username, se_users.user_fname, se_users.user_lname FROM se_forummoderators LEFT JOIN se_users ON se_forummoderators.forummoderator_user_id=se_users.user_id WHERE se_forummoderators.forummoderator_forum_id='{$forum_info['forum_id']}' AND se_users.user_id IS NOT NULL");
while ($user_info = $database->database_fetch_assoc($mods)) {
$mod_user = new se_user();
$mod_user->user_info[user_id] = $user_info[user_id];
$mod_user->user_info[user_username] = $user_info[user_username];
$mod_user->user_info[user_fname] = $user_info[user_fname];
$mod_user->user_info[user_lname] = $user_info[user_lname];
$mod_user->user_displayname();
$mod_array[] = $mod_user;
}
$forum_info[forum_mods] = $mod_array;
// GET LAST POST
$lastpost = $database->database_query("SELECT se_forumposts.forumpost_id, se_forumposts.forumpost_date, se_forumposts.forumpost_authoruser_id, se_forumtopics.forumtopic_id, se_forumtopics.forumtopic_subject, se_users.user_id, se_users.user_username, se_users.user_fname, se_users.user_lname, se_users.user_photo FROM se_forumposts LEFT JOIN se_forumtopics ON se_forumposts.forumpost_forumtopic_id=se_forumtopics.forumtopic_id LEFT JOIN se_users ON se_forumposts.forumpost_authoruser_id=se_users.user_id WHERE se_forumtopics.forumtopic_forum_id='{$forum_info[forum_id]}' AND se_forumposts.forumpost_deleted='0' ORDER BY se_forumposts.forumpost_id DESC LIMIT 1");
if ($database->database_num_rows($lastpost) == 1) {
$lastpost_info = $database->database_fetch_assoc($lastpost);
$forum_info[lastpost] = true;
// GET POST AUTHOR
$author = new se_user();
if ($lastpost_info['forumpost_authoruser_id'] != $lastpost_info['user_id']) {
$author->user_exists = false;
} else {
$author->user_exists = true;
$author->user_info['user_id'] = $lastpost_info['user_id'];
$author->user_info['user_username'] = $lastpost_info['user_username'];
$author->user_info['user_fname'] = $lastpost_info['user_fname'];
$author->user_info['user_lname'] = $lastpost_info['user_lname'];
$author->user_info['user_photo'] = $lastpost_info['user_photo'];
$author->user_displayname();
}
$lastpost_info[author] = $author;
$forum_info[lastpost_info] = $lastpost_info;
} else {
$forum_info[lastpost] = false;
}
if ($forum_info[lastpost]) {
$forum_info[is_read] = false;
if (isset($_COOKIE["forum_{$user->user_info[user_id]}_{$forum_info['forum_id']}"])) {
if ($_COOKIE["forum_{$user->user_info[user_id]}_{$forum_info['forum_id']}"] >= $forum_info[lastpost_info][forumpost_date]) {
$forum_info[is_read] = true;
}
}
} else {
$forum_info[is_read] = true;
}
$forum_array[] = $forum_info;
}
}
SE_Language::_preload($forumcat_info[forumcat_title]);
$forumcat_info[forums] = $forum_array;
$forumcat_array[] = $forumcat_info;
}
return $forumcat_array;
}
示例7: switch
if ($setting[setting_subnet_field2_id] != -2 && $subnet_info[subnet_field2_qual] != "" && $subnet_info[subnet_field2_value] != "") {
$subnet_field2_qual = $subnet_info[subnet_field2_qual];
switch ($secondary[field_type]) {
case "1":
case "2":
$subnet_field2_value = $subnet_info[subnet_field2_value];
$subnet_field2_value_date = 0;
break;
case "3":
case "4":
$subnet_field2_value_date = 0;
// LOOP OVER FIELD OPTIONS
$options = $secondary[field_options];
for ($i = 0, $max = count($options); $i < $max; $i++) {
if ($subnet_info[subnet_field2_value] == $options[$i][value]) {
SE_Language::_preload_multi($options[$i][label]);
SE_Language::load();
$subnet_field2_value = SE_Language::_get($options[$i][label]);
break;
}
}
break;
case "5":
$subnet_field2_value_date = $subnet_info[subnet_field2_value];
$subnet_field2_value = $datetime->cdate($setting[setting_dateformat], $subnet_info[subnet_field2_value]);
break;
}
}
// SET SUBNET ARRAY AND INCREMENT SUBNET COUNT
SE_Language::_preload($subnet_info[subnet_name]);
$subnet_array[] = array('subnet_id' => $subnet_info[subnet_id], 'subnet_name' => $subnet_info[subnet_name], 'subnet_field1_qual' => $subnet_info[subnet_field1_qual], 'subnet_field1_value_formatted' => $subnet_field1_value, 'subnet_field1_value' => $subnet_info[subnet_field1_value], 'subnet_field1_month' => $datetime->cdate("n", $subnet_field1_value_date), 'subnet_field1_day' => $datetime->cdate("j", $subnet_field1_value_date), 'subnet_field1_year' => $datetime->cdate("Y", $subnet_field1_value_date), 'subnet_field2_qual' => $subnet_field2_qual, 'subnet_field2_value_formatted' => $subnet_field2_value, 'subnet_field2_value' => $subnet_info[subnet_field2_value], 'subnet_field2_month' => $datetime->cdate("n", $subnet_field2_value_date), 'subnet_field2_day' => $datetime->cdate("j", $subnet_field2_value_date), 'subnet_field2_year' => $datetime->cdate("Y", $subnet_field2_value_date), 'subnet_users' => $subnet_info[users]);
示例8: isset
<?php
/* $Id: admin_lostpass.php 8 2009-01-11 06:02:53Z nico-izo $ */
$page = "admin_lostpass";
include "admin_header.php";
$task = isset($_POST['task']) ? $_POST['task'] : "main";
// SET ERROR VARS
$is_error = 0;
$submitted = 0;
if ($task == "send_email") {
$admin_email = $_POST['admin_email'];
$admin_query = $database->database_query("SELECT admin_id FROM se_admins WHERE admin_email='{$admin_email}' LIMIT 1");
$submitted = 1;
if ($database->database_num_rows($admin_query) != 1) {
$is_error = 1;
} else {
$lostpassword_code = randomcode(15);
$lostpassword_time = time();
$admin_lost = $database->database_fetch_assoc($admin_query);
$database->database_query("UPDATE se_admins SET admin_lostpassword_code='{$lostpassword_code}', admin_lostpassword_time='{$lostpassword_time}' WHERE admin_id='{$admin_lost['admin_id']}' LIMIT 1");
$prefix = $url->url_base;
$link = "<a href=\"{$prefix}" . "admin/admin_lostpass_reset.php?admin_id={$admin_lost['admin_id']}&r={$lostpassword_code}\">{$prefix}" . "admin/admin_lostpass_reset.php?admin_id={$admin_lost['admin_id']}&r={$lostpassword_code}</a>";
SE_Language::_preload_multi(40, 41);
SE_Language::load();
send_generic($admin_email, $admin_email, SE_Language::_get(40), SE_Language::_get(41), array("[link]"), array($link));
}
}
// ASSIGN VARIABLES AND INCLUDE FOOTER
$smarty->assign('is_error', $is_error);
$smarty->assign('submitted', $submitted);
include "admin_footer.php";
示例9: search_event
//.........这里部分代码省略.........
$event_query .= "se_eventvalues.eventvalue_{$field_info['field_id']} IN (SELECT CASE " . implode(" ", $cases) . " END AS value FROM se_languagevars WHERE languagevar_id IN (" . implode(", ", $langids) . ") AND languagevar_value LIKE '%{$search_text}%')";
}
} elseif ($field_info['field_type'] == 6) {
$options = unserialize($field_info['field_options']);
$langids = array();
$cases = array();
for ($i = 0, $max = count($options); $i < $max; $i++) {
$cases[] = "WHEN languagevar_id='{$options[$i]['label']}' THEN " . pow(2, $i);
$langids[] = $options[$i]['label'];
}
if (count($cases) != 0) {
if ($event_query != "") {
$event_query .= " OR ";
}
$event_query .= "se_eventvalues.eventvalue_{$field_info['field_id']} & (SELECT sum(CASE " . implode(" ", $cases) . " END) AS value FROM se_languagevars WHERE languagevar_id IN (" . implode(", ", $langids) . ") AND languagevar_value LIKE '%{$search_text}%')";
}
}
}
// CONSTRUCT QUERY
$event_query = "\r\n (\r\n SELECT \r\n '1' AS sub_type,\r\n se_events.event_id AS event_id, \r\n se_events.event_title AS event_title, \r\n se_events.event_photo AS event_photo,\r\n '' AS title,\r\n se_events.event_desc AS description,\r\n '' AS id,\r\n '' AS extra\r\n FROM \r\n se_eventvalues \r\n LEFT JOIN \r\n se_events \r\n ON \r\n se_eventvalues.eventvalue_event_id=se_events.event_id \r\n WHERE \r\n se_events.event_search='1' \r\n AND \r\n ({$event_query})\r\n ORDER BY event_id DESC\r\n )\r\n UNION ALL\r\n (\r\n SELECT\r\n '2' AS sub_type,\r\n se_events.event_id AS event_id, \r\n se_events.event_title AS event_title, \r\n se_events.event_photo AS event_photo,\r\n se_eventmedia.eventmedia_title AS title,\r\n se_eventmedia.eventmedia_desc AS description,\r\n se_eventmedia.eventmedia_id AS id,\r\n se_eventmedia.eventmedia_ext AS extra\r\n FROM\r\n se_eventmedia,\r\n se_eventalbums,\r\n se_events\r\n WHERE\r\n se_eventmedia.eventmedia_eventalbum_id=se_eventalbums.eventalbum_id AND\r\n se_eventalbums.eventalbum_event_id=se_events.event_id AND\r\n se_events.event_search='1'\r\n AND\r\n (\r\n se_eventmedia.eventmedia_title LIKE '%{$search_text}%' OR\r\n se_eventmedia.eventmedia_desc LIKE '%{$search_text}%'\r\n )\r\n ORDER BY eventmedia_id DESC\r\n )\r\n ";
// GET TOTAL EVENT RESULTS
$total_events = $database->database_num_rows($database->database_query($event_query . " LIMIT 201"));
// IF NOT TOTAL ONLY
if ($t == "event") {
// MAKE EVENT PAGES
$start = ($p - 1) * $results_per_page;
$limit = $results_per_page + 1;
// SEARCH EVENTS
$resource = $database->database_query($event_query . " LIMIT {$start}, {$limit}");
while ($event_info = $database->database_fetch_assoc($resource)) {
// SET UP EVENT
$event = new se_event();
$event->event_info['event_id'] = $event_info['event_id'];
$event->event_info['event_photo'] = $event_info['event_photo'];
$thumb_path = $event->event_photo('./images/nophoto.gif', TRUE);
// IF DESCRIPTION IS LONG
if (strlen($event_info['description']) > 150) {
$event_info['description'] = substr($event_info['description'], 0, 147) . "...";
}
if (strlen($event_info['event_desc']) > 150) {
$event_info['event_desc'] = substr($event_info['event_desc'], 0, 147) . "...";
}
// RESULT IS A EVENT
if ($event_info[sub_type] == 1) {
$result_url = $url->url_create('event', NULL, $event_info['event_id']);
$result_name = 3000282;
$result_name_1 = $event_info['event_title'];
$result_desc = 3000284;
$result_desc_1 = $event_info['description'];
} elseif ($event_info[sub_type] == 2) {
$result_url = $url->url_create('event_media', NULL, $event_info['event_id'], $event_info['id']);
$result_name = 3000283;
$result_name_1 = $event_info['title'];
$result_desc = 3000285;
$result_desc_1 = "event.php?event_id=" . $event_info[event_id];
$result_desc_2 = $event_info['event_title'];
$result_desc_3 = $event_info['description'];
// SET THUMBNAIL, IF AVAILABLE
switch ($event_info['extra']) {
case "jpeg":
case "jpg":
case "gif":
case "png":
case "bmp":
$thumb_path = $event->event_dir($event->event_info['event_id']) . $event_info['id'] . "_thumb.jpg";
break;
case "mp3":
case "mp4":
case "wav":
$thumb_path = "./images/icons/audio_big.gif";
break;
case "mpeg":
case "mpg":
case "mpa":
case "avi":
case "swf":
case "mov":
case "ram":
case "rm":
$thumb_path = "./images/icons/video_big.gif";
break;
default:
$thumb_path = "./images/icons/file_big.gif";
}
if (!file_exists($thumb_path)) {
$thumb_path = "./images/icons/file_big.gif";
}
}
$results[] = array('result_url' => $result_url, 'result_icon' => $thumb_path, 'result_name' => $result_name, 'result_name_1' => $result_name_1, 'result_desc' => $result_desc, 'result_desc_1' => $result_desc_1, 'result_desc_2' => $result_desc_2, 'result_desc_3' => $result_desc_3);
}
// SET TOTAL RESULTS
$total_results = $total_events;
}
// SET ARRAY VALUES
SE_Language::_preload_multi(3000281, 3000282, 3000283, 3000284, 3000285);
if ($total_events > 200) {
$total_events = "200+";
}
$search_objects[] = array('search_type' => 'event', 'search_lang' => 3000281, 'search_total' => $total_events);
}
示例10: elseif
$task = $_POST['task'];
} elseif (isset($_GET['task'])) {
$task = $_GET['task'];
} else {
$task = "";
}
// INCREMENT VIEW
if ($task == "view") {
$faq_id = $_GET['faq_id'];
$database->database_query("UPDATE se_faqs SET faq_views=faq_views+1 WHERE faq_id='{$faq_id}'");
exit;
}
$faqcats = $database->database_query("SELECT * FROM se_faqcats ORDER BY faqcat_order");
while ($faqcat_info = $database->database_fetch_assoc($faqcats)) {
$faq_array = array();
$faqs = $database->database_query("SELECT * FROM se_faqs WHERE faq_faqcat_id='{$faqcat_info['faqcat_id']}' ORDER BY faq_order");
while ($faq_info = $database->database_fetch_assoc($faqs)) {
SE_Language::_preload_multi($faq_info[faq_subject], $faq_info['faq_content']);
$faq_info['faq_content'] = htmlspecialchars_decode($faq_info['faq_content'], ENT_QUOTES);
$faq_array[] = $faq_info;
}
SE_Language::_preload($faqcat_info['faqcat_title']);
$faqcat_info[faqs] = $faq_array;
$faqcat_array[] = $faqcat_info;
}
// SET GLOBAL PAGE TITLE/DESCRIPTION
$global_page_title[0] = 957;
$global_page_description[0] = 958;
// ASSIGN SMARTY VARIABLES AND INCLUDE FOOTER
$smarty->assign('faqcats', $faqcat_array);
include "footer.php";
示例11: 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)) {
示例12: search_profile
function search_profile()
{
global $database, $url, $results_per_page, $p, $search_text, $t, $search_objects, $results, $total_results;
// GET FIELDS
$fields = $database->database_query("\r\n SELECT\r\n profilefield_id AS field_id,\r\n profilefield_type AS field_type,\r\n profilefield_options AS field_options\r\n FROM\r\n se_profilefields\r\n WHERE\r\n profilefield_type<>'5' &&\r\n (profilefield_dependency<>'0' OR (profilefield_dependency='0' AND profilefield_display<>'0'))\r\n ");
$profile_query = "se_users.user_username LIKE '%{$search_text}%' OR CONCAT(se_users.user_fname, ' ', se_users.user_lname) LIKE '%{$search_text}%'";
// LOOP OVER FIELDS
while ($field_info = $database->database_fetch_assoc($fields)) {
// TEXT FIELD OR TEXTAREA
if ($field_info['field_type'] == 1 || $field_info['field_type'] == 2) {
if ($profile_query) {
$profile_query .= " OR ";
}
$profile_query .= "`se_profilevalues`.`profilevalue_{$field_info['field_id']}` LIKE '%{$search_text}%'";
} elseif ($field_info[field_type] == 3 || $field_info[field_type] == 4) {
$options = unserialize($field_info['field_options']);
$langids = array();
$cases = array();
for ($i = 0, $max = count($options); $i < $max; $i++) {
$cases[] = "WHEN languagevar_id='{$options[$i]['label']}' THEN {$options[$i]['value']}";
$langids[] = $options[$i][label];
}
if (count($cases) != 0) {
if ($profile_query) {
$profile_query .= " OR ";
}
$profile_query .= "`se_profilevalues`.`profilevalue_{$field_info['field_id']}` IN (SELECT CASE " . implode(" ", $cases) . " END AS value FROM se_languagevars WHERE languagevar_id IN (" . implode(", ", $langids) . ") AND languagevar_value LIKE '%{$search_text}%')";
}
} elseif ($field_info[field_type] == 6) {
$options = unserialize($field_info['field_options']);
$langids = array();
$cases = array();
for ($i = 0, $max = count($options); $i < $max; $i++) {
$cases[] = "WHEN languagevar_id='{$options[$i]['label']}' THEN " . pow(2, $i);
$langids[] = $options[$i][label];
}
if (count($cases) != 0) {
if ($profile_query) {
$profile_query .= " OR ";
}
$profile_query .= "`se_profilevalues`.`profilevalue_{$field_info['field_id']}` & (SELECT sum(CASE " . implode(" ", $cases) . " END) AS value FROM se_languagevars WHERE languagevar_id IN (" . implode(", ", $langids) . ") AND languagevar_value LIKE '%{$search_text}%')";
}
}
}
// CONSTRUCT QUERY
$profile_query = "\r\n SELECT\r\n se_users.user_id,\r\n se_users.user_username,\r\n se_users.user_fname,\r\n se_users.user_lname,\r\n se_users.user_photo\r\n FROM\r\n se_profilevalues\r\n LEFT JOIN\r\n se_users\r\n ON se_profilevalues.profilevalue_user_id=se_users.user_id\r\n LEFT JOIN\r\n se_levels\r\n ON se_levels.level_id=se_users.user_level_id\r\n WHERE\r\n se_users.user_verified='1' AND\r\n se_users.user_enabled='1' AND\r\n (se_users.user_search='1' OR se_levels.level_profile_search='0') AND\r\n ({$profile_query})\r\n ";
// GET TOTAL PROFILES
$total_profiles = $database->database_num_rows($database->database_query($profile_query . " LIMIT 201"));
// IF NOT TOTAL ONLY
if ($t == "0") {
// MAKE PROFILE PAGES
$start = ($p - 1) * $results_per_page;
$limit = $results_per_page + 1;
// SEARCH PROFILES
$online_users_array = online_users();
$profiles = $database->database_query($profile_query . " ORDER BY se_users.user_id DESC LIMIT {$start}, {$limit}");
while ($profile_info = $database->database_fetch_assoc($profiles)) {
// CREATE AN OBJECT FOR USER
$profile = new se_user();
$profile->user_info['user_id'] = $profile_info['user_id'];
$profile->user_info['user_username'] = $profile_info['user_username'];
$profile->user_info['user_fname'] = $profile_info['user_fname'];
$profile->user_info['user_lname'] = $profile_info['user_lname'];
$profile->user_info['user_photo'] = $profile_info['user_photo'];
$profile->user_displayname();
// DETERMINE IF USER IS ONLINE
$is_online = (bool) in_array($profile_info['user_username'], $online_users_array[0]);
$results[] = array('result_url' => $url->url_create('profile', $profile_info['user_username']), 'result_icon' => $profile->user_photo('./images/nophoto.gif', TRUE), 'result_name' => 509, 'result_name_1' => $profile->user_displayname, 'result_desc' => '', 'result_online' => $is_online);
}
// SET TOTAL RESULTS
$total_results = $total_profiles;
}
// SET ARRAY VALUES
SE_Language::_preload_multi(509, 1072);
if ($total_profiles > 200) {
$total_profiles = "200+";
}
$search_objects[] = array('search_type' => '0', 'search_lang' => 1072, 'search_total' => $total_profiles);
}
示例13: search_music
function search_music()
{
global $database, $url, $results_per_page, $p, $search_text, $t, $search_objects, $results, $total_results, $user;
// CONSTRUCT QUERY
$sql = "\r\n SELECT\r\n se_music.*,\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_music\r\n LEFT JOIN\r\n se_users\r\n ON se_users.user_id=se_music.music_user_id\r\n WHERE\r\n se_music.music_title LIKE '%{$search_text}%'\r\n ";
// GET TOTAL RESULTS
$total_music = $database->database_num_rows($database->database_query($sql . " LIMIT 201"));
// IF NOT TOTAL ONLY
if ($t == "music") {
// MAKE MUSIC PAGES
$start = ($p - 1) * $results_per_page;
$limit = $results_per_page + 1;
// Lang for download song
SE_Language::_preload(4000095);
SE_Language::load();
// SEARCH MUSIC
$sql .= " ORDER BY se_music.music_id DESC LIMIT {$start}, {$limit}";
$resource = $database->database_query($sql) or die($database->database_error());
while ($music_info = $database->database_fetch_assoc($resource)) {
// CREATE AN OBJECT FOR USER
$profile = new se_user();
$profile->user_info['user_id'] = $music_info['user_id'];
$profile->user_info['user_username'] = $music_info['user_username'];
$profile->user_info['user_fname'] = $music_info['user_fname'];
$profile->user_info['user_lname'] = $music_info['user_lname'];
$profile->user_info['user_photo'] = $music_info['user_photo'];
$profile->user_displayname();
$result_url = $url->url_create('profile', $music_info['user_username']);
$result_name = 4000105;
$result_desc = 4000106;
$userdir = $url->url_userdir($music_info['user_id']);
$music_path = "{$userdir}{$music_info['music_id']}.{$music_info['music_ext']}";
// IF NO TITLE
if (!trim($music_info['music_title'])) {
SE_Language::_preload(589);
SE_Language::load();
$music_info['music_title'] = SE_Language::_get(589);
}
$dl_lv = SE_Language::_get(4000095);
$desc3 = <<<EOF
<br />
<table><tr><td>
<object width="17" height="17" data="images/music_button.swf?song_url={$music_path}" type="application/x-shockwave-flash">
<param value="images/music_button.swf?song_url={$music_path}" name="movie" />
<img width="17" height="17" alt="" src="noflash.gif" />
</object>
</td>
EOF;
if ($user->user_exists && $user->level_info['level_music_allow_downloads']) {
$desc3 .= <<<EOF
<td style="padding-left:10px;vertical-align:middle;">
<a type="application/force-download" href="{$music_path}">{$dl_lv}</a>
</td>
EOF;
}
$desc3 .= "</tr></table>";
$results[] = array('result_url' => $result_url, 'result_icon' => './images/icons/music_music48.gif', 'result_name' => $result_name, 'result_name_1' => $music_info['music_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' => $desc3);
}
// SET TOTAL RESULTS
$total_results = $total_music;
}
// SET ARRAY VALUES
SE_Language::_preload_multi(4000104, 4000105, 4000106);
if ($total_music > 200) {
$total_music = "200+";
}
$search_objects[] = array('search_type' => 'music', 'search_lang' => 4000104, 'search_total' => $total_music);
}
示例14: search_video
function search_video()
{
global $database, $url, $results_per_page, $p, $search_text, $t, $search_objects, $results, $total_results;
// CONSTRUCT QUERY
$video_query = "SELECT \r\n\t\t\t se_videos.*, \r\n\t\t\t se_users.user_id, \r\n\t\t\t se_users.user_username,\r\n\t\t\t se_users.user_photo,\r\n\t\t\t se_users.user_fname,\r\n\t\t\t se_users.user_lname\r\n\t\t\tFROM\r\n\t\t\t se_videos,\r\n\t\t\t se_users,\r\n\t\t\t se_levels\r\n\t\t\tWHERE\r\n\t\t\t se_videos.video_user_id=se_users.user_id AND\r\n\t\t\t se_users.user_level_id=se_levels.level_id AND\r\n\t\t\t (\r\n\t\t\t se_videos.video_search='1' OR\r\n\t\t\t se_levels.level_video_search='0'\r\n\t\t\t )\r\n\t\t\t AND\r\n\t\t\t (\r\n\t\t\t se_videos.video_title LIKE '%{$search_text}%' OR\r\n\t\t\t se_videos.video_desc LIKE '%{$search_text}%'\r\n\t\t\t )";
// GET TOTAL RESULTS
$total_videos = $database->database_num_rows($database->database_query($video_query . " LIMIT 201"));
// IF NOT TOTAL ONLY
if ($t == "video") {
// MAKE VIDEO PAGES
$start = ($p - 1) * $results_per_page;
$limit = $results_per_page + 1;
// SEARCH VIDEOS
$video = new se_video();
$videos = $database->database_query($video_query . " ORDER BY video_id DESC LIMIT {$start}, {$limit}");
while ($video_info = $database->database_fetch_assoc($videos)) {
// CREATE AN OBJECT FOR USER
$profile = new se_user();
$profile->user_info[user_id] = $video_info[user_id];
$profile->user_info[user_username] = $video_info[user_username];
$profile->user_info[user_fname] = $video_info[user_fname];
$profile->user_info[user_lname] = $video_info[user_lname];
$profile->user_info[user_photo] = $video_info[user_photo];
$profile->user_displayname();
// SET RESULT VARS
$result_url = $url->url_create("video", $video_info[user_username], $video_info[video_id]);
$result_name = 5500141;
$result_desc = 5500142;
// SET DIRECTORY
$video_info[video_dir] = $video->video_dir($video_info[user_id]);
// CHECK FOR THUMBNAIL
$thumb_path = $video_info[video_dir] . $video_info[video_id] . "_thumb.jpg";
if (!file_exists($thumb_path)) {
$video_info[video_thumb] = "./images/video_placeholder.gif";
}
// IF NO TITLE
if ($video_info[video_title] == "") {
$video_info[video_title] = SE_Language::get(589);
}
// IF DESCRIPTION IS LONG
if (strlen($video_info[video_desc]) > 150) {
$video_info[video_desc] = substr($video_info[video_desc], 0, 147) . "...";
}
$results[] = array('result_url' => $result_url, 'result_icon' => $thumb_path, 'result_name' => $result_name, 'result_name_1' => $video_info[video_title], 'result_desc' => $result_desc, 'result_desc_1' => $url->url_create('profile', $video_info[user_username]), 'result_desc_2' => $profile->user_displayname, 'result_desc_3' => $video_info[video_desc]);
}
// SET TOTAL RESULTS
$total_results = $total_videos;
}
// SET ARRAY VALUES
SE_Language::_preload_multi(5500141, 5500142, 5500143);
if ($total_videos > 200) {
$total_videos = "200+";
}
$search_objects[] = array('search_type' => 'video', 'search_lang' => 5500143, 'search_total' => $total_videos);
}
示例15: search_album
function search_album()
{
global $database, $url, $results_per_page, $p, $search_text, $t, $search_objects, $results, $total_results;
// CONSTRUCT QUERY
$album_query = "\r\n\t(\r\n\tSELECT\r\n '1' AS sub_type,\r\n\t se_media.media_album_id AS album_id,\r\n\t se_media.media_title AS title,\r\n\t se_media.media_desc AS description,\r\n\t se_media.media_id AS media_id,\r\n\t se_media.media_ext AS media_ext,\r\n\t se_users.user_id,\r\n\t se_users.user_username,\r\n\t se_users.user_photo,\r\n\t se_users.user_fname,\r\n\t se_users.user_lname\r\n\tFROM\r\n\t se_media,\r\n\t se_albums,\r\n\t se_users,\r\n\t se_levels\r\n\tWHERE\r\n\t se_media.media_album_id=se_albums.album_id AND\r\n\t se_albums.album_user_id=se_users.user_id AND\r\n\t se_users.user_level_id=se_levels.level_id AND\r\n\t (\r\n\t se_albums.album_search='1' OR\r\n\t se_levels.level_album_search='0'\r\n\t )\r\n\t AND\r\n\t (\r\n\t se_media.media_title LIKE '%{$search_text}%' OR\r\n\t se_media.media_desc LIKE '%{$search_text}%'\r\n\t )\r\n\tORDER BY media_id DESC\r\n\t)\r\n\tUNION ALL\r\n\t(\r\n\tSELECT\r\n\t '2' AS sub_type,\r\n\t se_albums.album_id AS album_id,\r\n\t se_albums.album_title AS title,\r\n\t se_albums.album_desc AS description,\r\n\t se_albums.album_cover AS media_id,\r\n\t se_media.media_ext AS media_ext,\r\n\t se_users.user_id,\r\n\t se_users.user_username,\r\n\t se_users.user_photo,\r\n\t se_users.user_fname,\r\n\t se_users.user_lname\r\n\tFROM\r\n\t se_albums,\r\n\t se_users,\r\n\t se_levels,\r\n\t se_media\r\n\tWHERE\r\n\t se_albums.album_user_id=se_users.user_id AND\r\n\t se_users.user_level_id=se_levels.level_id AND\r\n\t se_albums.album_cover=se_media.media_id AND \r\n\t (\r\n\t se_albums.album_search='1' OR\r\n\t se_levels.level_album_search='0'\r\n\t )\r\n\t AND\r\n\t (\r\n\t se_albums.album_title LIKE '%{$search_text}%' OR\r\n\t se_albums.album_desc LIKE '%{$search_text}%'\r\n\t )\r\n\tORDER BY album_id DESC\r\n\t)";
// GET TOTAL RESULTS
$total_albums = $database->database_num_rows($database->database_query($album_query . " LIMIT 201"));
// IF NOT TOTAL ONLY
if ($t == "album") {
// MAKE ALBUM PAGES
$start = ($p - 1) * $results_per_page;
$limit = $results_per_page + 1;
// SEARCH ALBUMS
$albums = $database->database_query($album_query . " ORDER BY album_id DESC LIMIT {$start}, {$limit}");
while ($album_info = $database->database_fetch_assoc($albums)) {
// CREATE AN OBJECT FOR USER
$profile = new se_user();
$profile->user_info['user_id'] = $album_info['user_id'];
$profile->user_info['user_username'] = $album_info['user_username'];
$profile->user_info['user_fname'] = $album_info['user_fname'];
$profile->user_info['user_lname'] = $album_info['user_lname'];
$profile->user_info['user_photo'] = $album_info['user_photo'];
$profile->user_displayname();
// RESULT IS A MEDIA
if ($album_info[sub_type] == 1) {
$result_url = $url->url_create('album_file', $album_info['user_username'], $album_info['album_id'], $album_info['media_id']);
$result_name = 1000119;
$result_desc = 1000121;
// RESULT IS AN ALBUM
} else {
$result_url = $url->url_create('album', $album_info['user_username'], $album_info['album_id']);
$result_name = 1000120;
$result_desc = 1000122;
}
// SET THUMBNAIL, IF AVAILABLE
switch ($album_info['media_ext']) {
case "jpeg":
case "jpg":
case "gif":
case "png":
case "bmp":
$thumb_path = $url->url_userdir($album_info['user_id']) . $album_info['media_id'] . "_thumb.jpg";
break;
case "mp3":
case "mp4":
case "wav":
$thumb_path = "./images/icons/audio_big.gif";
break;
case "mpeg":
case "mpg":
case "mpa":
case "avi":
case "swf":
case "mov":
case "ram":
case "rm":
$thumb_path = "./images/icons/video_big.gif";
break;
default:
$thumb_path = "./images/icons/file_big.gif";
}
if (!file_exists($thumb_path)) {
$thumb_path = "./images/icons/file_big.gif";
}
// IF NO TITLE
if ($album_info['title'] == "") {
SE_Language::_preload(589);
SE_Language::load();
$album_info['title'] = SE_Language::_get(589);
}
// IF DESCRIPTION IS LONG
if (strlen($album_info['description']) > 150) {
$album_info['description'] = substr($album_info['description'], 0, 147) . "...";
}
$results[] = array('result_url' => $result_url, 'result_icon' => $thumb_path, 'result_name' => $result_name, 'result_name_1' => $album_info['title'], 'result_desc' => $result_desc, 'result_desc_1' => $url->url_create('profile', $album_info['user_username']), 'result_desc_2' => $profile->user_displayname, 'result_desc_3' => $album_info['description']);
}
// SET TOTAL RESULTS
$total_results = $total_albums;
}
// SET ARRAY VALUES
SE_Language::_preload_multi(1000118, 1000119, 1000120, 1000121, 1000122);
if ($total_albums > 200) {
$total_albums = "200+";
}
$search_objects[] = array('search_type' => 'album', 'search_lang' => 1000118, 'search_total' => $total_albums);
}