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


PHP SE_Language::get方法代码示例

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


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

示例1: 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

示例2: search_forum

function search_forum()
{
    global $database, $url, $results_per_page, $p, $search_text, $t, $search_objects, $results, $total_results;
    // SET LEVEL ID
    if ($user->user_exists) {
        $level_id = $user->level_info[level_id];
    } else {
        $level_id = 0;
    }
    // RETRIEVE A LIST OF FORUMS USER IS ALLOWED TO VIEW
    $forum_ids = array();
    $forums = $database->database_query("SELECT se_forums.forum_id FROM se_forums LEFT JOIN se_forumlevels ON se_forums.forum_id=se_forumlevels.forumlevel_forum_id AND se_forumlevels.forumlevel_level_id='{$level_id}' LEFT JOIN se_forummoderators ON se_forums.forum_id=se_forummoderators.forummoderator_forum_id AND se_forummoderators.forummoderator_user_id='{$user->user_info[user_id]}' WHERE se_forumlevels.forumlevel_forum_id IS NOT NULL OR se_forummoderators.forummoderator_forum_id IS NOT NULL");
    while ($forum_info = $database->database_fetch_assoc($forums)) {
        $forum_ids[] = $forum_info[forum_id];
    }
    // CONSTRUCT QUERY
    $forum_query = "\r\n\t(\r\n\tSELECT\r\n\t  '1' AS sub_type,\r\n\t  se_forums.forum_id AS forum_id,\r\n\t  se_forumtopics.forumtopic_id AS forumtopic_id,\r\n\t  '0' AS forumpost_id,\r\n\t  se_forums.forum_title AS forum_title,\r\n\t  se_forumtopics.forumtopic_subject AS forumtopic_subject,\r\n\t  se_forumtopics.forumtopic_excerpt AS excerpt\r\n\tFROM\r\n\t  se_forumtopics\r\n\tLEFT JOIN\r\n\t  se_forums\r\n\tON\r\n\t  se_forumtopics.forumtopic_forum_id=se_forums.forum_id\r\n\tWHERE\r\n\t  se_forums.forum_id IN ('" . implode("', '", $forum_ids) . "')\r\n\t  AND\r\n\t  se_forumtopics.forumtopic_subject LIKE '%{$search_text}%'\r\n\tORDER BY se_forumtopics.forumtopic_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_forumtopics.forumtopic_forum_id AS forum_id,\r\n\t  se_forumtopics.forumtopic_id AS forumtopic_id,\r\n\t  se_forumposts.forumpost_id AS forumpost_id,\r\n\t  '' AS forum_title,\r\n\t  se_forumtopics.forumtopic_subject AS forumtopic_subject,\r\n\t  se_forumposts.forumpost_excerpt AS excerpt\r\n\tFROM\r\n\t  se_forumposts\r\n\tLEFT JOIN\r\n\t  se_forumtopics\r\n\tON\r\n\t  se_forumposts.forumpost_forumtopic_id=se_forumtopics.forumtopic_id\r\n\tWHERE\r\n\t  se_forumtopics.forumtopic_forum_id IN ('" . implode("', '", $forum_ids) . "')\r\n\t  AND\r\n\t  se_forumposts.forumpost_deleted='0'\r\n\t  AND\r\n\t  se_forumposts.forumpost_body LIKE '%{$search_text}%'\r\n\t  AND \r\n\t  se_forumtopics.forumtopic_subject NOT LIKE '%{$search_text}%'\r\n\tORDER BY se_forumposts.forumpost_id DESC\r\n\t)";
    // GET TOTAL FORUM RESULTS
    $total_forums = $database->database_num_rows($database->database_query($forum_query . " LIMIT 201"));
    // IF NOT TOTAL ONLY
    if ($t == "forum") {
        // MAKE FORUM PAGES
        $start = ($p - 1) * $results_per_page;
        $limit = $results_per_page + 1;
        // SEARCH FORUMS
        $posts = $database->database_query($forum_query . " LIMIT {$start}, {$limit}") or die(mysql_query());
        while ($post_info = $database->database_fetch_assoc($posts)) {
            $post_info['excerpt'] = $post_info['excerpt'] . "...";
            // RESULT IS A TOPIC
            if ($post_info[sub_type] == 1) {
                $result_url = "forum_topic.php?forum_id={$post_info[forum_id]}&topic_id={$post_info[forumtopic_id]}";
                $result_name = 6000131;
                $result_name_1 = $post_info['forumtopic_subject'];
                $result_desc = 6000132;
                $result_desc_1 = $post_info['forum_id'];
                $result_desc_2 = SE_Language::get($post_info['forum_title']);
                $result_desc_3 = strlen($post_info['excerpt']) > 50 ? substr($post_info['excerpt'], 0, 47) . "..." : $post_info['excerpt'];
                // RESULT IS A POST
            } elseif ($post_info['sub_type'] == 2) {
                $result_url = "forum_topic.php?forum_id={$post_info[forum_id]}&topic_id={$post_info[forumtopic_id]}&post_id={$post_info[forumpost_id]}#post_{$post_info[forumpost_id]}";
                $result_name = 6000133;
                $result_name_1 = $post_info['forumtopic_subject'];
                $result_desc = 6000134;
                $result_desc_1 = $post_info['excerpt'];
            }
            $results[] = array('result_url' => $result_url, 'result_icon' => 'images/icons/file_big.gif', '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_forums;
    }
    // SET ARRAY VALUES
    SE_Language::_preload_multi(6000131, 6000132, 6000133, 6000134, 6000135);
    if ($total_forums > 200) {
        $total_forums = "200+";
    }
    $search_objects[] = array('search_type' => 'forum', 'search_lang' => 6000135, 'search_total' => $total_forums);
}
开发者ID:Maharaja1,项目名称:thebest-social,代码行数:57,代码来源:functions_forum.php

示例3: json_encode

    } else {
        echo json_encode(array('result' => FALSE, 'error' => SE_Language::get($event->is_error)));
    }
    exit;
} elseif ($task == "eventmembercancel") {
    if ($user->user_exists && $event->event_member_cancel($user_id)) {
        echo json_encode(array('result' => TRUE));
    } else {
        echo json_encode(array('result' => FALSE, 'error' => SE_Language::get($event->is_error)));
    }
    exit;
} elseif ($task == "eventmemberinvite") {
    if ($user->user_exists && is_array($invites) && !empty($invites) && ($invites_sent = $event->event_member_invite($invites))) {
        echo json_encode(array('result' => TRUE, 'invites_sent' => $invites_sent));
    } else {
        echo json_encode(array('result' => FALSE, 'error' => SE_Language::get($event->is_error)));
    }
    exit;
} elseif ($task == "getfriends") {
    $results = array();
    //$sql = "SELECT user_id, user_username, user_fname, user_lname FROM se_friends LEFT JOIN se_users ON se_friends.friend_user_id2=se_users.user_id LEFT JOIN se_levels ON se_users.user_level_id=se_levels.level_id LEFT JOIN se_eventmembers ON se_users.user_id=se_eventmembers.eventmember_user_id AND se_eventmembers.eventmember_event_id={$event->event_info[event_id]} WHERE se_friends.friend_status=1 AND se_friends.friend_user_id1='{$user->user_info['user_id']}' AND se_eventmembers.eventmember_id IS NULL ORDER BY user_fname, user_lname, user_username";
    $sql = "SELECT user_id, user_username, user_fname, user_lname FROM se_friends LEFT JOIN se_users ON se_friends.friend_user_id2=se_users.user_id LEFT JOIN se_levels ON se_users.user_level_id=se_levels.level_id LEFT JOIN se_eventmembers ON se_users.user_id=se_eventmembers.eventmember_user_id AND se_eventmembers.eventmember_event_id={$event->event_info[event_id]} WHERE (se_levels.level_event_allow & 2) AND se_friends.friend_status=1 AND se_friends.friend_user_id1='{$user->user_info['user_id']}' AND se_eventmembers.eventmember_id IS NULL ORDER BY user_fname, user_lname, user_username";
    $resource = $database->database_query($sql);
    while ($friend_info = $database->database_fetch_assoc($resource)) {
        $friend = new se_user();
        $friend->user_info['user_id'] = $friend_info['user_id'];
        $friend->user_info['user_username'] = $friend_info['user_username'];
        $friend->user_info['user_fname'] = $friend_info['user_fname'];
        $friend->user_info['user_lname'] = $friend_info['user_lname'];
        $friend->user_displayname();
        $results[$friend_info['user_id']] = $friend->user_displayname;
开发者ID:amitjoy,项目名称:nitd-network,代码行数:31,代码来源:event_ajax.php

示例4: forum_bbcode_parse_view

 function forum_bbcode_parse_view($string)
 {
     // DO [quote]
     $open_quote = preg_match_all('/\\[quote\\=(.*?)\\]/i', $string, $matches);
     $close_quote = preg_match_all('/\\[\\/quote\\]/i', $string, $matches);
     $total_tags = $open_quote > $close_quote ? $close_quote : $open_quote;
     if ($total_tags) {
         $string = preg_replace('/\\[quote\\=(.*?)\\]/i', "<div class='forum_quote'><div>" . SE_Language::get(6000117, array('$1')) . "</div>", $string, $total_tags);
         $string = strrev(preg_replace('/\\]etouq\\/\\[/i', ">vid/<", strrev($string), $total_tags));
     }
     return $string;
 }
开发者ID:Maharaja1,项目名称:thebest-social,代码行数:12,代码来源:class_forum.php

示例5: substr

<?php

/* $Id: help_tos.php 8 2009-01-11 06:02:53Z john $ */
$page = "help_tos";
include "header.php";
$terms_of_service = SE_Language::get(1210);
// SET GLOBAL PAGE TITLE/DESCRIPTION
$global_page_title[0] = 753;
$global_page_description[0] = 1157;
$global_page_description[1] = substr($terms_of_service, 0, 150);
// ASSIGN VARIABLES AND INCLUDE FOOTER
$smarty->assign('terms_of_service', htmlspecialchars_decode($terms_of_service, ENT_QUOTES));
include "footer.php";
开发者ID:Maharaja1,项目名称:thebest-social,代码行数:13,代码来源:help_tos.php

示例6: blog_categories_generate

 function blog_categories_generate($where = NULL)
 {
     global $database;
     $sql = "\r\n      SELECT\r\n        COUNT(*) AS blogentry_count,\r\n        se_blogentries.blogentry_blogentrycat_id,\r\n        se_blogentrycats.*\r\n      FROM\r\n        se_blogentries\r\n      LEFT JOIN\r\n        se_blogentrycats\r\n        ON se_blogentrycats.blogentrycat_id=se_blogentries.blogentry_blogentrycat_id\r\n      WHERE\r\n        se_blogentries.blogentry_user_id='{$this->user_id}' &&\r\n        (se_blogentries.blogentry_blogentrycat_id=0 || se_blogentrycats.blogentrycat_user_id=0 || se_blogentrycats.blogentrycat_user_id='{$this->user_id}')\r\n    ";
     if ($where) {
         $sql .= " &&\r\n        {$where}\r\n    ";
     }
     $sql .= "\r\n      GROUP BY\r\n        se_blogentries.blogentry_blogentrycat_id\r\n      ORDER BY\r\n        se_blogentries.blogentry_blogentrycat_id ASC\r\n    ";
     $resource = $database->database_query($sql);
     $blog_cats = array();
     while ($result = $database->database_fetch_assoc($resource)) {
         if (empty($result['blogentrycat_id'])) {
             $result['blogentrycat_id'] = 0;
             $result['blogentrycat_title'] = SE_Language::get(1500035);
         }
         if (!empty($result['blogentrycat_languagevar_id'])) {
             SE_Language::_preload($result['blogentrycat_languagevar_id']);
         }
         $blog_cats[] = $result;
     }
     return $blog_cats;
 }
开发者ID:amitjoy,项目名称:nitd-network,代码行数:22,代码来源:class_blog.php

示例7: smarty_modifier_he_wall_format_text

function smarty_modifier_he_wall_format_text($text, $length = 300)
{
    if (strlen($text) <= 300) {
        return $text;
    }
    $short_text = preg_replace('/\\s+?(\\S+)?$/', '', substr($text, 0, $length + 1));
    $short_text = substr($short_text, 0, $length);
    $hidden_text = '<span class="display_none">' . substr($text, $length) . '</span>';
    $show_more_link = '<a href="javascript://" onclick="he_wall_show_more(this);" class="show_more_text">' . SE_Language::get(690706079) . '</a>';
    $formatted_text = $short_text . '<span>...</span>' . $show_more_link . $hidden_text;
    return $formatted_text;
}
开发者ID:amitjoy,项目名称:nitd-network,代码行数:12,代码来源:functions_he_wall.php

示例8: he_paging

function he_paging( $params = array() )
{
	$total = (int)$params['total'];
	$in_page = (int)$params['on_page'];
	$pages_count = (int)$params['pages'];

	$request_uri = $_SERVER['PHP_SELF'];
			
	if( !$total || !$in_page || !$pages_count)
	{
		return '';
	}
	
	if( ($total_pages = ceil($total / $in_page)) <= 1 )
	{
		return '';
	}
	
	$current = @$_GET['page'];
	$current = intval($current) ? $current : 1;
		
	$offset = ceil($pages_count / 2) - 1;
	$offset_inc = ($total_pages - $offset) - $current;
	$offset+= ($offset_inc <= 0) ? abs($offset_inc) + ( ($pages_count%2) ? 0 : 1 ) : 0;
		
	$page = ($current - $offset) > 1 ? ($current - $offset) : 1;
		
	$paging = '';
	
	for ( $counter = 1; $counter <= $pages_count && $page <= $total_pages; $counter++ )
	{
		$active = ($page == $current) ? 'class="active"' : '';
		$url = he_make_url($request_uri, array( 'page' => $page ));
		$paging .= "<a href='{$url}' {$active}>{$page}</a>";
		$page++;
	}
	
	switch ( $current )
	{
		case 1:
			$paging .= "<a href='" . he_make_url($request_uri, array( 'page' => $current+1 )) . "'>" . SE_Language::get(680680001) . "</a>";
			$paging .= "<a href='" . he_make_url($request_uri, array( 'page' => $total_pages)) . "'>" . SE_Language::get(680680002) . "</a>";
			break;
			
		case $total_pages:
			$paging = "<a href='" . he_make_url($request_uri, array( 'page' => $current-1 )) . "'>" . SE_Language::get(680680003) . "</a>" . $paging;
			$paging = "<a href='" . he_make_url($request_uri, array( 'page' => 1 )) . "'>" . SE_Language::get(680680004) . "</a>" . $paging;
			break;
			
		default:
			$paging = "<a href='" . he_make_url($request_uri, array( 'page' => $current-1 )) . "'>" . SE_Language::get(680680003) . "</a>" . $paging;
			$paging = "<a href='" . he_make_url($request_uri, array( 'page' => 1 )) . "'>" . SE_Language::get(680680004) . "</a>" . $paging;
			
			$paging .= "<a href='" . he_make_url($request_uri, array( 'page' => $current+1 )) . "'>" . SE_Language::get(680680001) . "</a>";
			$paging .= "<a href='" . he_make_url($request_uri, array( 'page' => $total_pages )). "'>" . SE_Language::get(680680002) . "</a>";
			break;
	}
	
	$out = '<div class="paging">';
	$out .= '<span>' . SE_Language::get(680680005) . ' </span>';
	$out .= $paging . '</div>';


	return $out;	
}
开发者ID:amitjoy,项目名称:nitd-network,代码行数:65,代码来源:functions_he_common.php

示例9: he_wall_format_text

    }
    $text = he_wall_format_text($text);
    $replace_arr = array($user->user_info['user_username'], $user->user_displayname, $text, $link_url, $link_label, he_wall::get_wall_link($wall_object, $wall_object_id));
    $actions->actions_add($user, 'wallpostlink', $replace_arr, array(), 0, false, $action_object_owner, $wall_object_id, $action_privacy_level);
    he_wall::new_post_notify($wall_object, $wall_object_id, $new_action_id);
    $result = he_wall_actions_display($wall_object, $wall_object_id, $first_action_id);
} elseif ($task == 'post_video') {
    $first_action_id = isset($_POST['first_action_id']) ? (int) $_POST['first_action_id'] : false;
    $action_privacy_level = isset($_POST['action_privacy_level']) ? (int) $_POST['action_privacy_level'] : 63;
    $text = isset($_POST['text']) ? trim($_POST['text']) : '';
    $video_provider = isset($_POST['video_provider']) ? trim($_POST['video_provider']) : '';
    $video_url = isset($_POST['video_url']) ? trim($_POST['video_url']) : '';
    if ($video_provider != 'youtube' && $video_provider != 'vimeo') {
        $result = array('result' => 0, 'message' => SE_Language::get(690706072));
    } elseif ($video_url == '') {
        $result = array('result' => 0, 'message' => SE_Language::get(690706073));
    } else {
        $new_action_id = he_wall::new_action_id();
        $pages_id = $wall_object == 'pages' ? $wall_object_id : 0;
        if ($pages_id && $video_provider == 'vimeo') {
            $upload_result = he_wall_vimeo_video_upload($new_action_id, $video_url, $pages_id);
        } elseif ($video_provider == 'vimeo') {
            $upload_result = he_wall_vimeo_video_upload($new_action_id, $video_url);
        } elseif ($video_provider == 'youtube') {
            if ($pages_id) {
                $upload_result = he_wall_youtube_video_custom_upload($new_action_id, $video_url, $pages_id);
            } elseif (isset($global_plugins['video']) && $setting['setting_he_wall_video_sync']) {
                $upload_result = he_wall_youtube_video_upload($new_action_id, $video_url, $action_privacy_level);
            } else {
                $upload_result = he_wall_youtube_video_custom_upload($new_action_id, $video_url);
            }
开发者ID:amitjoy,项目名称:nitd-network,代码行数:31,代码来源:he_wall_ajax_request.php

示例10: VALUES

 $mediasize = @getimagesize($media_dir . $media_info[$type . 'media_id'] . '.' . $media_info[$type . 'media_ext']);
 $media_info['media_width'] = $mediasize[0];
 $media_info['media_height'] = $mediasize[1];
 // VALIDATE TAG HEIGHT AND WIDTH BASED ON IMAGE SIZE
 if ($mediatag_x + $mediatag_height > $media_info['media_height']) {
     $mediatag_x = $mediatag_x - ($mediatag_x + $mediatag_height - $media_info['media_height']);
 }
 if ($mediatag_y + $mediatag_width > $media_info['media_width']) {
     $mediatag_y = $mediatag_y - ($mediatag_y + $mediatag_width - $media_info['media_width']);
 }
 $database->database_query("\r\n    INSERT INTO `se_{$type}mediatags` (\r\n      `{$type}mediatag_{$type}media_id`,\r\n      `{$type}mediatag_user_id`,\r\n      `{$type}mediatag_x`,\r\n      `{$type}mediatag_y`,\r\n      `{$type}mediatag_height`,\r\n      `{$type}mediatag_width`,\r\n      `{$type}mediatag_text`,\r\n      `{$type}mediatag_date`\r\n    ) VALUES (\r\n      '" . $media_info[$type . 'media_id'] . "',\r\n      '{$mediatag_user_id}',\r\n      '{$mediatag_x}',\r\n      '{$mediatag_y}',\r\n      '{$mediatag_height}',\r\n      '{$mediatag_width}',\r\n      '{$mediatag_text}',\r\n      '" . time() . "'\r\n    )\r\n  ");
 $mediatag_id = $database->database_insert_id();
 // SET OBJECT TITLE
 $object_title = $media_info[$type . 'media_title'];
 if ($object_title == "") {
     $object_title = SE_Language::get(589);
 }
 // SEND NOTIFICATION TO OWNER
 if ($owner_user->user_info['user_id'] != $user->user_info['user_id']) {
     $notifytype = $notify->notify_add($owner_user->user_info['user_id'], $type . 'mediatag', $media_info[$type . 'media_id'], array($owner_user->user_info['user_username'], $media_info[$type . 'media_id'], $object_owner_id), array($object_title));
     $object_url = $url->url_base . vsprintf($notifytype['notifytype_url'], array($owner_iden, $media_info[$type . 'media_id']));
     $owner_user->user_settings();
     if ($owner_user->usersetting_info['usersetting_notify_' . $type . 'mediatag']) {
         send_systememail($type . 'mediatag', $owner_user->user_info['user_email'], array($owner_user->user_displayname, $user->user_displayname, "<a href=\"" . $object_url . "\">" . $object_url . "</a>"));
     }
 }
 // INSERT ACTION AND SEND NOTIFICATION TO TAGGED USER
 if ($taggeduser->user_exists == 1) {
     // ENSURE USER ISN'T ALREADY TAGGED IN THIS PHOTO
     if ($database->database_num_rows($database->database_query("SELECT `{$type}mediatag_id` FROM `se_{$type}mediatags` WHERE `{$type}mediatag_{$type}media_id`='" . $media_info[$type . 'media_id'] . "' AND `{$type}mediatag_user_id`='{$taggeduser->user_info['user_id']}'")) == 1) {
         $media_path = $media_dir . $media_info[$type . 'media_id'] . "_thumb.jpg";
开发者ID:rahulsiwal,项目名称:younity,代码行数:31,代码来源:misc_js.php

示例11: foreach

    foreach ($_POST['result_id'] as $index => $result_id) {
        $result_id = (int) $result_id;
        $title = isset($_POST['title'][$index]) ? trim($_POST['title'][$index]) : false;
        $desciption = isset($_POST['description'][$index]) ? trim($_POST['description'][$index]) : false;
        $photo = isset($_POST['photo'][$index]) ? trim($_POST['photo'][$index]) : false;
        $photo_key = 'photo_' . ($index + 1);
        $quiz_result = array('id' => $result_id, 'title' => $title, 'description' => $desciption, 'photo' => $photo, 'filename' => $photo_key);
        $result_ids[] = $result_id;
        $result_arr[] = $quiz_result;
        if (strlen($title) == 0) {
            continue;
        }
        $quiz_results[] = $quiz_result;
    }
    if (count($quiz_results) >= $min_result_count) {
        he_quiz::save_results($quiz_id, $quiz_results);
        $redirect_url = "quiz_questions.php?quiz_id={$quiz_id}";
        header("Location: {$redirect_url}");
        exit;
    }
    $message = array('type' => 'error', 'title' => SE_Language::get(690691108, array($min_result_count)), 'text' => SE_Language::get(690691109));
}
$result_arr = $result_arr ? $result_arr : he_quiz::get_results($quiz_id, true);
$photo_url = he_quiz::photo_url();
$smarty->assign('quiz_id', $quiz_id);
$smarty->assign('result_arr', $result_arr);
$smarty->assign('steps', $steps);
$smarty->assign('message', $message);
$smarty->assign('min_result_count', $min_result_count);
$smarty->assign('photo_url', $photo_url);
include "footer.php";
开发者ID:amitjoy,项目名称:nitd-network,代码行数:31,代码来源:quiz_results.php

示例12: event_media_upload

 function event_media_upload($file_name, $eventalbum_id, &$space_left)
 {
     global $class_event, $database, $url;
     // SET KEY VARIABLES
     $file_maxsize = $this->eventowner_level_info['level_event_album_maxsize'];
     $file_exts = explode(",", str_replace(" ", "", strtolower($this->eventowner_level_info['level_event_album_exts'])));
     $file_types = explode(",", str_replace(" ", "", strtolower($this->eventowner_level_info['level_event_album_mimes'])));
     $file_maxwidth = $this->eventowner_level_info['level_event_album_width'];
     $file_maxheight = $this->eventowner_level_info['level_event_album_height'];
     $time = time();
     $new_media = new se_upload();
     $new_media->new_upload($file_name, $file_maxsize, $file_exts, $file_types, $file_maxwidth, $file_maxheight);
     // UPLOAD AND RESIZE PHOTO IF NO ERROR
     if (!$new_media->is_error) {
         // INSERT ROW INTO MEDIA TABLE
         $sql = "\r\n        INSERT INTO se_eventmedia\r\n          (eventmedia_eventalbum_id, eventmedia_date)\r\n        VALUES\r\n        ('{$eventalbum_id}', '{$time}')\r\n      ";
         $resource = $database->database_query($sql);
         $eventmedia_id = $database->database_insert_id();
         // CHECK IF IMAGE RESIZING IS AVAILABLE, OTHERWISE MOVE UPLOADED IMAGE
         $event_dir = $this->event_dir($this->event_info['event_id']);
         if ($new_media->is_image) {
             $file_dest = "{$event_dir}{$eventmedia_id}.jpg";
             $thumb_dest = "{$event_dir}{$eventmedia_id}_thumb.jpg";
             // UPLOAD THUMB
             $new_media->upload_thumb($thumb_dest, 200);
             // UPLOAD PHOTO
             $new_media->upload_photo($file_dest);
             $file_ext = "jpg";
             $file_filesize = filesize($file_dest);
         } else {
             $file_dest = "{$event_dir}{$eventmedia_id}.{$new_media->file_ext}";
             $thumb_dest = "{$event_dir}{$eventmedia_id}_thumb.jpg";
             if ($new_media->file_ext == 'gif') {
                 $new_media->upload_thumb($thumb_dest, 200);
             }
             $new_media->upload_file($file_dest);
             $file_ext = $new_media->file_ext;
             $file_filesize = filesize($file_dest);
         }
         // CHECK SPACE LEFT
         if ($space_left !== FALSE && $file_filesize > $space_left) {
             $new_media->is_error = 1;
             $new_media->error_message = $class_event[1] . $_FILES[$file_name]['name'];
             // TODO LANG
         } elseif ($space_left !== FALSE) {
             $space_left = $space_left - $file_filesize;
         }
         // DELETE FROM DATABASE IF ERROR
         if ($new_media->is_error) {
             $sql = "DELETE FROM se_eventmedia WHERE eventmedia_id='{$eventmedia_id}' AND eventmedia_eventalbum_id='{$eventalbum_id}'";
             $resource = $database->database_query($sql);
             @unlink($file_dest);
         } else {
             $sql = "UPDATE se_eventmedia SET eventmedia_ext='{$file_ext}', eventmedia_filesize='{$file_filesize}' WHERE eventmedia_id='{$eventmedia_id}' AND eventmedia_eventalbum_id='{$eventalbum_id}'";
             $resource = $database->database_query($sql);
             if (!is_numeric($file_filesize)) {
                 $file_filesize = 0;
             }
             $sql = "UPDATE se_eventalbums SET eventalbum_totalfiles=eventalbum_totalfiles+1, eventalbum_totalspace=eventalbum_totalspace+'{$file_filesize}' WHERE eventalbum_id='{$eventalbum_id}' LIMIT 1";
             $resource = $database->database_query($sql);
         }
     }
     // IF ERROR
     if ($new_media->is_error) {
         $new_media->error_message = $_FILES[$file_name]['name'] . " - " . SE_Language::get($new_media->is_error);
     }
     // RETURN FILE STATS
     return array('is_error' => $new_media->is_error, 'error_message' => $new_media->error_message, 'file_name' => $_FILES[$file_name]['name'], 'eventmedia_id' => $eventmedia_id, 'eventmedia_ext' => $file_ext, 'eventmedia_filesize' => $file_filesize);
 }
开发者ID:amitjoy,项目名称:nitd-network,代码行数:69,代码来源:class_event.php

示例13: addslashes

            }
        }
    }
    // CHECK IF USER IS ALREADY LOGGED IN - IF SO, DO NOTHING
    if ($login_result == "success") {
        $chatuser_query = $database->database_query("SELECT chatuser_user_id FROM se_chatusers WHERE chatuser_user_id='" . $user->user_info[user_id] . "' LIMIT 1");
        if (!$database->database_num_rows($chatuser_query)) {
            // GET USER PHOTO, ADD USER TO DATABASE
            $chatuser_photo_path = $url->url_userdir($user->user_info[user_id]) . $user->user_info[user_photo];
            if (!file_exists($chatuser_photo_path) or $user->user_info[user_photo] == "") {
                $chatuser_photo = "";
            } else {
                $chatuser_photo = $user->user_info[user_photo];
            }
            $database->database_query("\r\n        INSERT INTO se_chatusers\r\n          (chatuser_user_id, chatuser_user_username, chatuser_user_displayname, chatuser_lastupdate, chatuser_user_photo)\r\n        VALUES\r\n          ('{$user->user_info['user_id']}', '{$user->user_info['user_username']}', '" . addslashes($user->user_displayname) . "', '{$nowtime}', '{$chatuser_photo}')\r\n      ");
            // INSERT WELCOME MESSAGE
            $time_welcome = time();
            $message_username = "";
            $message_welcome = sprintf(SE_Language::get(3500023), $user->user_displayname);
            $database->database_query("\r\n        INSERT INTO se_chatmessages\r\n          (chatmessage_time, chatmessage_user_username, chatmessage_content)\r\n        VALUES\r\n          ('{$time_welcome}', '{$message_username}', '{$message_welcome}')\r\n      ");
        }
    }
    // OUTPUT RESULT
    ob_end_clean();
    echo $login_result;
    exit;
}
// SET SMARTY VARS AND DISPLAY PAGE
$smarty->assign('server_time', $datetime->timezone(time(), $global_timezone) * 1000);
ob_end_clean();
include "footer.php";
开发者ID:amitjoy,项目名称:nitd-network,代码行数:31,代码来源:chat_frame.php

示例14: randomcode

     $code = $_SESSION['code'];
     if ($code == "") {
         $code = randomcode();
     }
     if ($_POST['comment_secure'] != $code) {
         $is_error = 832;
     }
 }
 // MAKE SURE TOPIC BODY IS NOT EMPTY
 if (!trim($grouppost_body)) {
     $is_error = 2000298;
 }
 // RUN JAVASCRIPT FUNCTION
 echo "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><script type=\"text/javascript\">";
 if ($is_error) {
     $error = SE_Language::get($is_error);
     echo "window.parent.document.getElementById('post_error').innerHTML = '{$error}';";
     echo "window.parent.document.getElementById('post_error').style.display = 'block';";
 } else {
     $database->database_query("UPDATE se_grouptopics SET grouptopic_totalposts=grouptopic_totalposts+1 WHERE grouptopic_id='{$grouptopic_id}' LIMIT 1");
     $database->database_query("INSERT INTO se_groupposts (grouppost_grouptopic_id, grouppost_authoruser_id, grouppost_date, grouppost_body) VALUES ('{$grouptopic_id}', '{$user->user_info['user_id']}', '" . time() . "', '{$grouppost_body}')");
     $post_id = $database->database_insert_id();
     // INSERT ACTION IF USER EXISTS
     if ($user->user_exists) {
         $poster = $user->user_displayname;
         $grouppost_body_encoded = strip_tags($grouppost_body, '<br>');
         if (strlen($grouppost_body_encoded) > 250) {
             $grouppost_body_encoded = substr($grouppost_body_encoded, 0, 247) . "...";
         }
         $actions->actions_add($user, "grouppost", array($user->user_info['user_username'], $user->user_displayname, $group->group_info['group_id'], $grouptopic_info['grouptopic_id'], $grouptopic_info['grouptopic_subject'], $post_id, $grouppost_body_encoded), array(), 0, false, 'group', $group->group_info['group_id'], $group->group_info['group_privacy']);
     } else {
开发者ID:amitjoy,项目名称:nitd-network,代码行数:31,代码来源:group_discussion_post.php

示例15: 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);
}
开发者ID:amitjoy,项目名称:nitd-network,代码行数:55,代码来源:functions_video.php


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