break; } else { echo "<script language=\"javascript\" type=\"text/javascript\">"; echo "alert('No playlists to Add Media Added to playlist :)')"; echo "</script>"; } } } echo "<br/>"; echo "<br/>"; if ($_SESSION['username']) { $q = mysql_query("SELECT * FROM `Channels` where uid='{$uid}'") or die(mysql_error()); while ($row = mysql_fetch_assoc($q)) { $id = $row['chid']; if (!is_null($id)) { channels(); echo " <input name=\"channel\" class=\"button\" value=\"Post!\" type=\"submit\"/>"; break; } else { echo "<script language=\"javascript\" type=\"text/javascript\">"; echo "alert('You have no channels created :)')"; echo "</script>"; } } } ?> <br/> <br/> <br/><b><a style=\"color:red; font-size: 12pt" href="Downloads.php?mid=<?php echo "{$mid}";
function loop($id_usr, $type, $userloop, $follow, $tabnumber, $id_group) { include './inc/config.php'; $connuni = @mysql_connect($host, $user, $pass); @mysql_select_db($db, $connuni); echo "<!-- START TAB " . $tabnumber . " -->"; echo "<div id=\"country" . $tabnumber . "\" class=\"tabcontent\">\n\t<div id=\"statuses\">"; //Choose type! if ($type == "Public timeline") { $sql0 = "SELECT status_id,user_id,status, DATE_FORMAT(date_set,'%M %e, %Y @ %l:%i:%s %p') AS ds FROM mt_statuses ORDER BY date_set DESC"; } elseif ($type == "Following") { $long = strlen($follow); //echo $long; $long_m = $long - 1; //echo $long_m; $follow_m = substr($follow, -$long, $long_m); //echo $follow_m; $sql0 = "SELECT status_id,user_id,status, DATE_FORMAT(date_set,'%M %e, %Y @ %l:%i:%s %p') AS ds FROM mt_statuses WHERE user_id IN (" . avoid_injection($follow_m) . ") ORDER BY date_set DESC"; //This is to show user updates with following option to show OR user_id='$id_usr' } elseif ($type == "User") { $usern = name_hide($userloop); $sql0 = "SELECT status_id,user_id,status, DATE_FORMAT(date_set,'%M %e, %Y @ %l:%i:%s %p') AS ds FROM mt_statuses WHERE user_id='" . avoid_injection($userloop) . "' OR status LIKE '%@" . avoid_injection($usern) . "%' ORDER BY date_set DESC"; } /*For all*/ /*get page*/ $registros = 15; $pagina = $_GET["pagina"]; if (!$pagina) { $inicio = 0; $pagina = 1; } else { $inicio = ($pagina - 1) * $registros; } /*end get page*/ $r0 = mysql_query($sql0, $connuni) or die('La consulta falló:' . mysql_error($enlace)); $total_registros = mysql_num_rows($r0); if ($type == "User") { $usern = name_hide($userloop); $query = "SELECT status_id,user_id,status, DATE_FORMAT(date_set,'%M %e, %Y @ %l:%i:%s %p') AS ds FROM mt_statuses WHERE user_id='" . avoid_injection($userloop) . "' OR status LIKE '%@" . avoid_injection($usern) . "%' ORDER BY date_set DESC LIMIT {$inicio}, {$registros}"; } elseif ($type == "Following") { $long = strlen($follow); //echo $long; $long_m = $long - 1; //echo $long_m; $follow_m = substr($follow, -$long, $long_m); //echo $follow_m; $query = "SELECT status_id,user_id,status, DATE_FORMAT(date_set,'%M %e, %Y @ %l:%i:%s %p') AS ds FROM mt_statuses WHERE user_id IN (" . avoid_injection($follow_m) . ") ORDER BY date_set DESC LIMIT {$inicio}, {$registros}"; //This is to show user updates with following option to show OR user_id='$id_usr' } elseif ($type == "Public timeline") { $query = "SELECT status_id,user_id,status, DATE_FORMAT(date_set,'%M %e, %Y @ %l:%i:%s %p') AS ds FROM mt_statuses ORDER BY date_set DESC LIMIT {$inicio}, {$registros}"; } $result = mysql_query($query, $connuni) or die(mysql_error() . ': ' . $query); $total_paginas = ceil($total_registros / $registros); //This table was for pagination but I changed it for another one without js //Page links an title echo "<table width=\"445\"><thead>\n\t\n\t<tr>\n\t<td>"; if ($id_group != "") { echo "<form style=\"float: right;margin-top: 3px; margin-right: 3px; position: absolute;\" action=\"\" name=\"delete_group\" method=\"post\">"; echo "<input type=\"image\" src=\"" . $pth . "inc/icons/gr_dl.png\" name=\"delete_group_id\" value=\"" . $id_group . "\">"; echo "</form>"; $des = "SELECT group_desc, members FROM mt_group WHERE id_group='" . avoid_injection($id_group) . "'"; $resultdes = mysql_query($des, $connuni) or die(mysql_error() . ': ' . $query); while ($row = mysql_fetch_assoc($resultdes)) { echo "<div style=\"margin-left: 25px;\">"; echo $row["group_desc"]; $members_message = explode(",", $row["members"]); $b = 0; while ($members_message[$b]) { $namem = name_hide($members_message[$b]); $group_replie .= "@" . $namem . " "; $b = $b + 1; } echo " <a href=\"#\" style=\"border: 0px;float: right;\" onclick=\"insertAtCaret('status','" . $group_replie . "');\"><img border=0 src=\"./inc/icons/group_go.png\"></a>"; echo "</div>"; } } echo "</td></tr></thead><tbody>"; //loop while ($row = mysql_fetch_assoc($result)) { echo '<tr><td> <div class="status-box"> <div style="float: left; width: 430px;">'; echo "<form style=\"float: right;\" action=\"\" method=\"post\">"; if ($id_usr == $row['user_id']) { echo "<input type=\"image\" src=\"" . $pth . "inc/icons/dl.png\" name=\"status_id\" value=\"" . $row["status_id"] . "\">"; } echo "</form>"; echo "<form style=\"float: right;\" action=\"\" method=\"post\">"; if ($id_usr != $row['user_id']) { if (strstr($follow, $row['user_id']) == true) { } else { echo "<input type=\"image\" src=\"" . $pth . "inc/icons/+.png\" name=\"status_id_mas\" value=\"" . $row["user_id"] . "\">"; } } echo "</form>"; echo "<form style=\"float: right; "; if (strstr($follow, $row['user_id']) == true) { } else { echo "margin-top: 12px; margin-right: -9px;"; } echo "\" action=\"\" method=\"post\">"; if ($id_usr != $row['user_id']) { if (strstr($follow, $row['user_id']) == true) { echo "<input type=\"image\" src=\"" . $pth . "inc/icons/-.png\" name=\"status_id_menos\" value=\"" . $row["user_id"] . "\">"; } else { } } echo "</form>"; //avatar if (gravatar($row['user_id']) == "yes") { $grav_correo = correo($row["user_id"]); echo "<a class=\"avatar\" href=\"index.php?user="******"user_id"] . "\">"; echo "<img width=\"48\" height=\"48\" align=\"left\" style=\"margin-right: 5px;\" border=\"1\" src=\""; echo getGravatarUrl($grav_correo, $defImg, "80", "G"); echo "\" alt=\"Gravatar\"></a>"; } else { if (file_exists("./avatar/" . $row['user_id'] . ".jpg") == true) { echo "<a class=\"avatar\" href=\"index.php?user="******"user_id"] . "\">"; echo '<img align="left" width="48" height="48" style="margin-right: 5px;" border=\\"1\\" src="' . $pth . 'avatar/', $row['user_id'], '.jpg"></a>'; } else { echo "<a class=\"avatar\" href=\"index.php?user="******"user_id"] . "\">"; echo '<img align="left" width="48" height="48" style="margin-right: 5px;" border=\\"1\\" src="' . $defImg . '"></a>'; } } //user echo "<b>"; echo "<a href=\"#\" onclick=\"insertAtCaret('status','@"; name($row['user_id']); echo " ');\">"; name($row['user_id']); echo "</a>"; echo " </b>"; //sms //echo replies(emoticons(replace_urls(stripslashes($row['status'])))) $status = replace_urls(stripslashes($row['status'])); $status = replace_unu($status); $status = emoticons($status); $status = channels($status); echo replies($status); echo '</div><span class="time">', $row['ds'], '</span>'; echo " <a href=\"index.php?user="******"\" style=\"border: 0px;\">\n\t<img style=\"border: 0px;\" src=\"" . $pth . "inc/icons/u.png\" alt=\"u\"/></a> \n\t<a href=\"#\" style=\"border: 0px;\" onclick=\"insertAtCaret('status','@"; name($row['user_id']); echo " ');\">\n\t<img style=\"border: 0px;\" src=\"" . $pth . "inc/icons/r.png\" alt=\"r\"/></a>"; //echo "<img src=\"inc/icons/d.png\" alt=\"d\"/> //<img src=\"inc/icons/f.png\" alt=\"f\"/> "; echo "</div></td></tr>"; } ?> <!-- foot table with link pages buttoms--> </tbody> <tfoot> <td> <center> <?php if ($pagina - 1 > 0) { if ($type == "User") { echo "<a id=\"nuevo\" href=\"index.php?user="******"&pagina=" . ($pagina - 1) . "\"> Newer </a>"; } else { echo "<a id=\"nuevo\" href=\"index.php?pagina=" . ($pagina - 1) . "\"> Newer </a>"; } } else { if ($type == "User") { echo "<a id=\"nuevorss\" href=\"rss.php?user="******"\"> Rss </a>"; } else { echo "<a id=\"nuevorss\" href=\"rss.php\"> Rss </a>"; } } if ($pagina + 1 <= $total_paginas) { if ($type == "User") { echo "<a id=\"viejo\" href=\"index.php?user="******"&pagina=" . ($pagina + 1) . "\"> Older </a>"; } else { echo "<a id=\"viejo\" href=\"index.php?pagina=" . ($pagina + 1) . "\"> Older </a>"; } } else { } ?> </center> </td> </tfoot> </table> </div> <br><br> <div style="clear: both;"></div> <!-- END TAB <?php echo $tabnumber; ?> --> </div> <?php }
/** * main function. checks for authorization and renders the * required admin section. */ function admin_main($authorised) { echo "\n<div id=\"channel_admin\" class=\"frame\">"; if ($authorised) { admin_menu(); if (array_key_exists(CST_ADMIN_DOMAIN, $_REQUEST)) { switch ($_REQUEST[CST_ADMIN_DOMAIN]) { case CST_ADMIN_DOMAIN_FOLDER: $show = folder_admin(); break; case CST_ADMIN_DOMAIN_CHANNEL: $show = channel_admin(); break; case CST_ADMIN_DOMAIN_CONFIG: $show = config_admin(); break; case CST_ADMIN_DOMAIN_ITEM: $show = item_admin(); break; case CST_ADMIN_DOMAIN_PLUGINS: $show = plugins_admin(); break; case CST_ADMIN_DOMAIN_THEMES: $show = themes_admin(); break; case CST_ADMIN_DOMAIN_TAGS: $show = tags_admin(); break; case CST_ADMIN_DOMAIN_PLUGIN_OPTIONS: $show = plugin_options_admin(); break; case CST_ADMIN_DOMAIN_THEME_OPTIONS: $show = theme_options_admin(); break; default: break; } } if (array_key_exists(CST_ADMIN_VIEW, $_REQUEST) || isset($show)) { if (!isset($show)) { $show = $_REQUEST[CST_ADMIN_VIEW]; } switch ($show) { case CST_ADMIN_DOMAIN_CONFIG: config(); break; case CST_ADMIN_DOMAIN_CHANNEL: channels(); break; case CST_ADMIN_DOMAIN_FOLDER: folders(); break; case CST_ADMIN_DOMAIN_OPML: opml(); break; case CST_ADMIN_DOMAIN_NONE: break; case CST_ADMIN_DOMAIN_ITEM: items(); break; case CST_ADMIN_DOMAIN_SYSINFO: sysinfo(); break; case CST_ADMIN_DOMAIN_DASHBOARD: dashboard(); break; case CST_ADMIN_DOMAIN_PLUGINS: plugins(); break; case CST_ADMIN_DOMAIN_THEMES: themes(); break; case CST_ADMIN_DOMAIN_TAGS: tags(); break; case CST_ADMIN_DOMAIN_PLUGIN_OPTIONS: plugin_options(); break; case CST_ADMIN_DOMAIN_THEME_OPTIONS: theme_options(); break; default: } } else { if (true == getConfig('rss.config.defaultdashboard')) { dashboard(); } else { channels(); } } echo "\n<div class=\"clearer\"></div>\n"; } else { rss_error(sprintf(__('<h1>Not Authorized!</h1>You are not authorized to access the administration interface. Please follow <a href="%s">this link</a> back to the main page. Have a nice day!'), getPath()), RSS_ERROR_ERROR, true); } echo "</div>\n"; }
} else { $load_next_story_id = $last_story['story_id']; } $first_story = $stories[0]; if($news_office->get_first_story_id($channel_id) == $first_story['story_id']) { // no previous stories exists $load_previous_story_id = NULL; } else { $load_previous_story_id = $first_story['story_id']; } $next_previous_data = new LoadNextPreviousData(array("channel_id" => channelID()), "seek_story_id", $load_next_story_id, $load_previous_story_id, 'next'); } $channels = channels(); $channel_title = $channels[channelID()]; if($next_params = $next_previous_data->load_next_params()) { $load_next_url = "./?" . http_build_query($next_params); } if($previous_params = $next_previous_data->load_previous_params()) { $load_previous_url = "./?" . http_build_query($previous_params); } $next_phrase = isSearchResult() ? "Next" : "Older articles"; $previous_phrase = isSearchResult() ? "Previous" : "Newer articles"; if($page->branch == 'Webkit') { // capture the items html ob_start(); require "$page->branch/items.html";