Ejemplo n.º 1
0
function getVid($con, $s, $s1, $s2)
{
    $q = mysqli_query($con, "SELECT videos.id,videos.user,videos.name,videos.info,videos.pict,videos.vid,videos.dl,videos.date,users.user FROM `videos` INNER JOIN users ON users.id = videos.user WHERE videos.name LIKE '%{$s}%' OR videos.info LIKE '%{$s}%'  LIMIT 0 , 10 ");
    if (mysqli_num_rows($q) == 0) {
        return "<div class='m_s_g'>No content found</div>";
    }
    $ans = "";
    while ($r = mysqli_fetch_array($q)) {
        $ans .= "<a href='" . PTH . "/video-{$r['0']}' onclick='return setURI(\"video\",{$r['0']})'><li class='vid_item' vid='{$r['0']}' title='{$r['3']}' onclick='playvideo(event)' prev='{$r['4']}' video='{$r['5']}' info='{$r['3']}' vidname='{$r['2']}' vdate='" . gtime($r[7]) . "' owner='{$r['8']}' uid='{$r['1']}'>{$r['2']}</li></a>";
    }
    return $ans;
}
Ejemplo n.º 2
0
 function getVid($con, $s, $s1, $s2)
 {
     $q = mysqli_query($con, "SELECT videos.id,videos.user,videos.name,videos.info,videos.pict,videos.vid,videos.dl,videos.date,users.user FROM `videos` INNER JOIN users ON users.id = videos.user WHERE videos.name LIKE '%{$s}%' OR videos.info LIKE '%{$s}%'  LIMIT 0 , 10 ");
     $ans = "";
     if (mysqli_num_rows($q) == 0) {
         return "";
     }
     while ($r = mysqli_fetch_array($q)) {
         $name = str_replace($s, "<_>" . $s . "</_>", $r[2]);
         $ans .= "<a href='./video-{$r['0']}' onclick='return setURI(\"video\",{$r['0']})'><li class='vid_item' vid='{$r['0']}' title='{$r['3']}' onclick='playvideo(event)' prev='{$r['4']}' video='{$r['5']}' info='{$r['3']}' vidname='{$r['2']}' vdate='" . gtime($r[7]) . "' owner='{$r['8']}' style='width:220px;' uid='{$r['1']}'>{$name}</li></a>";
     }
     return $ans;
 }
Ejemplo n.º 3
0
function getVid($id)
{
    $con = new db();
    $conc = $con->c();
    $q = mysqli_query($conc, "SELECT videos.id,videos.user,videos.name,videos.info,videos.pict,videos.vid,videos.dl,videos.date,users.user FROM `videos` INNER JOIN users ON users.id = videos.user WHERE videos.id = {$id} ");
    if (mysqli_num_rows($q) == 0) {
        echo "({status:false,msg:'Sorry, this video cannot be found'})";
        //echo "<div class='m_s_g'>Sorry, this video cannot be found.</div>";
    } else {
        $n = 0;
        $r = mysqli_fetch_array($q);
        echo "({status:true,type:3,class:'vid_prev',title:'{$r['3']}',uid:'{$r['1']}',owner:'{$r['8']}',vid:'{$r['0']}',video:'{$r['5']}',prev:'{$r['4']}',vname:'{$r['2']}',vdate:'" . gtime($r[7]) . "'})";
        //echo"<table><tr>";
        //echo "<a href='#!/video=$r[0]'><div style='background:url(".PTH."/img/load/ml.gif) no-repeat center;' ><div vid='$r[0]' style='background:url(".PTH."/prev/$r[4]) no-repeat center;' class='vid_prev' title='$r[3]' onclick='playvideo(event);$(\"#pwindow\").fadeOut(500);' prev='$r[4]' video='$r[5]' info='$r[3]' vidname='$r[2]' vdate='".gtime($r[7])."' owner='$r[8]' uid='$r[1]'>$r[2]<br/>$r[3]</div></div></a>";
    }
    $con->close_db_con($conc);
    exit;
}
Ejemplo n.º 4
0
function getVid($uid)
{
    $con = new db();
    $conc = $con->c();
    $q = mysqli_query($conc, "SELECT videos.id,videos.user,videos.name,videos.info,videos.pict,videos.vid,videos.dl,videos.date,users.user FROM `videos` INNER JOIN users ON users.id = videos.user WHERE videos.user = {$uid} ");
    if (mysqli_num_rows($q) == 0) {
        echo "<div class='m_s_g'>No content has been added yet</div>";
    }
    $n = 0;
    echo "<table><tr>";
    while ($r = mysqli_fetch_array($q)) {
        $n++;
        echo "<td ><a href='./video-{$r['0']}' onclick='return setURI(\"video\",{$r['0']})' ><div style='background:url(" . PTH . "/img/load/ml.gif) no-repeat center;height:120px;width:120px;padding:10px;'><div style='background:url(" . PTH . "/prev/{$r['4']}) left;' class='vid_prev' title='{$r['3']}' onclick='playvideo(event)' prev='{$r['4']}' vid='{$r['0']}' video='{$r['5']}' info='{$r['3']}' owner='{$r['8']}' uid='{$uid}' vidname='{$r['2']}' vdate='" . gtime($r[7]) . "'>{$r['2']}<br/>{$r['3']}</div></div></a><br/></td>";
        echo $n % 4 == 0 ? "</tr><tr>" : "";
    }
    echo "</tr></table>";
    $con->close_db_con($conc);
    exit;
}
Ejemplo n.º 5
0
                <!--a href="#dialog"  id="nowplay" name="modal"><li>Now Playing : <B id='nowplaying'>Nothing</B></li></a-->
              
         
                 <?php 
if (!$is_me) {
    echo '<marquee  onMouseOver="this.stop();" onMouseOut="this.start();" behavior="slide" direction="left" width="200" id="_np_"></marquee>';
}
$q = NULL;
$q = mysqli_query($conc, "SELECT  music.id,music.user,music.name,music.info,music.mp3,music.dl,music.date,users.user FROM music INNER JOIN users ON users.id = music.user ORDER BY RAND() DESC limit 0,10 ");
while ($rr = mysqli_fetch_array($q)) {
    echo "<a href='" . PTH . "/music-{$rr['0']}' onclick='return setURI(\"music\",{$rr['0']})'><li title='{$rr['3']}' onclick='playmusic(event)' mid='{$rr['0']}' mname='{$rr['2']}' music='{$rr['4']}' mdate='" . gtime($rr[6]) . "' owner='{$rr['7']}' uid='{$rr['1']}' class='muzik_item' >{$rr['2']}</li></a>";
}
$q = NULL;
$q = mysqli_query($conc, "SELECT  videos.id,videos.user,videos.name,videos.info,videos.pict,videos.vid,videos.dl,videos.date,users.user FROM `videos` INNER JOIN users ON users.id = videos.user ORDER BY videos.id DESC limit 0,5 ");
while ($rrr = mysqli_fetch_array($q)) {
    echo "<a href='" . PTH . "/video-{$rrr['0']}' onclick='return setURI(\"video\",{$rrr['0']})'><li title='{$rrr['3']}' onclick='playvideo(event)' prev='{$rrr['4']}' video='{$rrr['5']}' vidname='{$rrr['2']}' vid='{$rrr['0']}' vdate='" . gtime($rrr[7]) . "' owner='{$rrr['8']}' uid='{$rrr['1']}' class='vid_item' >{$rrr['2']}</li></a>";
}
$con->close_db_con($conc);
?>
                 </ul>
            
            </div>
            <div class="title">Dining with you</div>
            <div id="box" class="playlist">           
           	<div id="_dinewu">
            
             </div>
            </div>
            
            <div class="title">Peeps you may know</div>
            <div id="box" class="playlist">
Ejemplo n.º 6
0
function post($id, $uid, $userid, $user, $name, $img, $date, $post, $var, $rid, $type, $client)
{
    $client_apps_array = array("", "web", "mobile", "");
    $client_apps_url = array("", "./?force_web=2", "./?force_mobile=2", "");
    $rp = "";
    $client1 = $client_apps_array[$client];
    $clienturl = $client_apps_url[$client];
    $client = "<a href='{$clienturl}' class='small' target='_blank'>via {$client1}</a>";
    if ($type == 1) {
        $con = new db();
        $conc = $con->c();
        $q = mysqli_query($conc, "SELECT `post`.`id`,`users`.`user` FROM `post` INNER JOIN `users` ON (`users`.`id` = `post`.`user`) WHERE `post`.`id` = {$rid} ");
        $r = mysqli_fetch_array($q);
        $pid = $r[1];
        $rp = "<a href='" . PTH . "/?view={$rid}&t={$type}' class='del'  onclick='return _op({$rid},{$type})' title='in reply to {$pid}'><table><tr><td><div class='preply'></div></td><td>to {$pid}</td></tr></table></a>";
        $con->close_db_con($conc);
    } else {
        if ($type == 2) {
            $con = new db();
            $conc = $con->c();
            $q = mysqli_query($conc, "SELECT `post`.`id`,`users`.`user` FROM `post` INNER JOIN `users` ON (`users`.`id` = `post`.`user`) WHERE `post`.`id` = {$rid} ");
            $r = mysqli_fetch_array($q);
            $pid = $r[1];
            $con->close_db_con($conc);
            $rp = "<a href='" . PTH . "/?view={$rid}&t={$type}' class='del' onclick='return _op({$rid},{$type})' title='refed from {$pid}'><table><tr><td><div class='prefeed'></div></td><td>from {$pid}</td></tr></table></a>";
        }
    }
    $bb = ".";
    $imgclass = "smpdiv";
    $post_style = "";
    $url = "./{$user}";
    if ($_SESSION["mobile"] == 2) {
        //	$bb = "..";
        //				$url = "./?i=$user";
        $imgclass = "ssmpdiv";
    }
    if ($var == "pop") {
        $style = "style='width:400px;'";
        $var = "";
        $imgclass = "ssmpdiv";
        $post_style = "style='font-size:10px;'";
    }
    if ($_SESSION["uid"] != 0) {
        $con = new db();
        $conc = $con->c();
        $del = $uid == $userid ? "<a onclick='return _del(event,\"{$id}\")'><div title='delete' class='delete'></div></a>" : "";
        $nl = numlikes($conc, $id);
        $like = _like($conc, $id, $uid) ? " style='background-image:url(" . PTH . "/img/like.png);' class='like' title='unlike {$nl}'" : " title='like {$nl}' style='background:url(" . PTH . "/img/like_2.png) center no-repeat;' class='like'";
        $con->close_db_con($conc);
        $llike = " <div {$like} onclick='_like(event,{$id},{$userid})' class='like' onmouseover='_textgrow(event)' align='center'>" . $nl . "</div>";
        $reply = "<a href='" . PTH . "/?rep={$id}&u={$user}&t=1' class='del' onclick='return _reply(event)' rid='{$id}' u='{$user}'><div class='preply' title='reply {$name}'></div></a>";
        $repost = "<a href='" . PTH . "/?rep={$id}&u={$user}&t=2' class='del' onclick='return _repost(event)' rid='{$id}' u='{$user}'><div title='refeed' class='prefeed' ></div></a>";
    }
    $style = stripos($post, "@" . $_SESSION["user"]) !== false ? "style='border-left:2px solid #444;'" : "";
    //			$style = $userid == $uid?"style='border-right:1px solid #444;'":$style;
    //			$style = "";
    //_pop(event,$userid)
    return "<div class='post' id='post{$id}' {$style} onmouseover='_postOver(event)' >\n\t\t\t\t<table width='100%'><tr><td width='10%'><a href='{$url}' onclick='return _pop(event,\"{$user}\")' ><div class='{$imgclass}' style='background-image:url(" . PTH . "{$img});'></div></a></td>\n\t\t\t\t<td width='90%'>\n\t\t\t\t<table width='100%'><tr><td width='100%'><a href='{$url}' onclick='return _pop(event,\"{$userid}\")' onmouseover='' >{$user}</a> <i style='_pn'>{$name}</i><br/><span class='_post' id='post_span_" . $id . "' {$post_style}>{$post}</span><br/></td></tr></table>\n\t\t\t\t<table style='float:right;'><tr><td valign='middle'><a class='del' style='display:none;' udate='" . date("U", $date) . "' title='" . date("r", $date) . "' href='" . PTH . "/?view={$id}&t=0' onclick='return _op({$id},0);'>" . gtime($date) . "</a></td><td valign='middle'>{$rp}</td><td valign='middle'>{$client}</td><td>{$llike}</td><td>{$reply}</td><td>{$repost}</td><td>{$del}</td><td valign='middle'>{$var}</td></tr></table></td></tr></table>\n\t\t\t\t</div> ";
}
Ejemplo n.º 7
0
    $conc = $con->c();
    $subjres = mysqli_query($conc, "SELECT `subj`,`u1` FROM `msg_subj` WHERE `id` = {$id} AND (`u1`={$uid} OR `u2` = {$uid})");
    $subj = mysqli_fetch_array($subjres);
    $result = "<div style='margin-left:25px;padding:10px 10px 30px 10px;width:100%;font-size:13px;' class='wp'><span style='color:#BBB;font:25px cursive, Verdana;letter-spacing:3px;'>" . $subj[0] . "</span><table cellspacing='5' width='90%'>";
    $lastview = mysqli_query($conc, "SELECT `uid` FROM `msg` WHERE `cid` = {$id} ORDER BY `id` DESC");
    $ltv = mysqli_fetch_array($lastview);
    if ($ltv[0] != $uid) {
        $old = mysqli_query($conc, "UPDATE `msg` SET `new` = 0 WHERE `cid` = {$id}");
    }
    $msgs = mysqli_query($conc, "SELECT `msg`.`id`,`msg`.`uid`,`msg`.`msg`,`msg`.`date`,`users`.`user`,`users`.`name`,`users`.`img1` FROM `msg` inner join `users` on (`msg`.`uid` = `users`.`id`)WHERE `msg`.`cid` = {$id} ORDER BY `msg`.`id` ASC");
    if ($msgs && $subjres) {
        echo "<br/><br/><a href='javascript:genbox()' style='margin:25px;font:13px cursive'>&lArr; Go Back</a><br/><br/>";
        $num = mysqli_num_rows($msgs);
        if ($num == 0) {
            echo "<center style='color:#888888;font-size:18px'><i> No messages </i></center>";
        }
        while ($res = mysqli_fetch_array($msgs)) {
            $del = $res[1] == $uid ? "<a href='#'class='del' onclick='delmsg(" . $res[0] . ",event)'><div class='delete' style='float:right' title='delete'></div></a>" : "";
            $vart = gtime($res[3]);
            $u = array($res[4], $res[5], $res[6]);
            //users($conc,"`fname`,`lname`,`img_m`",$res["email"]);
            $flname = "{$u['0']} <i>{$u['1']}</i>";
            $result .= "<tr><td style='width:70px' valign='top'><a href='./" . $res[1] . "' onclick='return _pop(event,{$res['1']})'><div  class='smpdiv' style='background:url(" . PTH . "{$u['2']}) top left no-repeat;' title='{$flname}'></div></a></td><td valign='top'><span style='color:#888;'>{$flname}</span><br/><span style='color:#444444;'>" . $res[2] . "</span> {$del}<br/><span style='font-size:10px;color:#777777;'>" . $vart . "</span></td></tr>";
        }
    }
    $uu = "." . $_SESSION["img1"];
    $con->close_db_con($conc);
    $result .= "</table><div class='_pco'><div class ='comm'><table><tr><td valign='top'><div class='smpdiv'style='background-image:url({$uu})' ></div></td><td><textarea id='txtamsg' placeholder='Message...' rows='1' onfocus='rows=2' class='txt' onkeyup='gment(event)'></textarea><div class='pl2div' style='position:relative'></div><br /><input type='button' onclick='sendmsg({$id},event)' style='float:right' class='button1' value='Send Message'/></td></tr></table></div></div><a href='#' onclick='addCommentV(event)'><div class='preply' style='width:200px;display:none;'>Reply Message</div></a></div></div><br/>";
    echo $result;
}
exit;
Ejemplo n.º 8
0
    } else {
        return "";
    }
}
echo strlen_("Gender", $sex_array[$r[17]]);
//echo strlen_("Education",$r[11]);
echo strlen_("Work", $r[12]);
echo strlen_("Birthday", bday_($r[13]));
echo strlen_("Status", $status_array[intval($r[14])] . " " . $r[15]);
echo strlen_("<Br/>Quote", $r[9]);
echo strlen_("Webpage", "<a href='http://" . urldecode($r[6]) . "' target='_blank'>" . urldecode($r[6]) . "</a>");
echo strlen_("<br/>Location", $r[2] . " " . $r[8]);
?>
            
            <!--h2><i style="color:#bbb;">Joined :</i> <?php 
echo gtime($r[7]);
?>
</h2-->
            </Div>

          <?php 
if ($r[0] == $uid) {
    ?>
            <div style="">
    <form method="post" target="bgf" action="./actions/uplbgimg.php" enctype="multipart/form-data"><input type="hidden" name="bgimg" />
    <label><input type="file" id="upl" name="upl" onchange="submit();uploading(true);" class="hdd_upl"/>
    <div class="upldiv" id="sc_cs" style="background-color:transparent;float:left !important;"title="change background"  onclick="if(navigator.userAgent.toString().indexOf('Firefox')>-1)$('#upl').click();" ></div></label></form><div  style="font-size:10px;border:1px solid #ccc; background-color:#eee; border-radius:2px;color:#444; display:none;width:200px;" id="upltxt" onmouseover="$(this).fadeOut(1000);"></div>
    <iframe height="0" width="0" frameborder="0" name="bgf"></iframe>
    </div>
    <div style="margin-left:40% !important;">
    <?php 
Ejemplo n.º 9
0
$uid = intval($_SESSION["uid"]);
$type = intval($_POST["type"]);
$owner = intval($_POST["owner"]);
$cid = intval($_POST["cid"]);
$id = intval($_POST["id"]);
$action = intval($_POST["action"]);
$post = _hstr_($_POST["post"], false);
$con = new db();
$conc = $con->c();
switch ($action) {
    case 1:
        $q = mysqli_query($conc, "SELECT comment.id,comment.owner,comment.uid,comment.post,comment.date,users.user,users.name,users.img1 FROM comment INNER JOIN users ON comment.uid = users.id WHERE comment.cid = {$cid} AND comment.type ={$type} ORDER BY comment.id ASC");
        echo "<div style='font-size:12px;'>";
        while ($r = mysqli_fetch_array($q)) {
            $del = $uid == $r[1] || $uid == $r[2] ? "&middot;<a href='#' onclick='return _delcom(event,{$type},{$r['0']})'><span class='del'>delete</span></a>" : "";
            echo "<div class='comment_" . $r[0] . "' style='width:100%;'>\n\t\t\t\t\t<table width='100%'><tr>\n\t\t\t\t\t<td width='10%'><a href='" . PTH . "/{$r['5']}' onclick='return _pop(event,{$r['2']});'><div class='ssmpdiv' style='background-image:url(" . PTH . "{$r['7']});'></div></a></td>\n\t\t\t\t\t<td valign='top'><a href='" . PTH . "/{$r['5']}' onclick='return _pop(event,{$r['2']});'>{$r['5']}</a>  <i style='_pn'>{$r['6']}</i><br/><span>{$r['3']}</span><div style='float:right;'><span class='del' title='" . date("U", $r[4]) . "'>" . gtime($r[4]) . "</span> {$del}</div></td></tr></table>\n\t\t\t  </div>";
        }
        echo $uid != 0 ? "\n\t<div class=''><div class ='comm'><table><tr><td valign='top'><div class='ssmpdiv'style='background-image:url(" . PTH . "" . $_SESSION["img1"] . ");'></div></td><td><textarea id='txtcom_" . $type . "' placeholder='Comment...' rows='3' class='txt' onkeyup='gment(event)'></textarea><div class='pl2div' style='position:relative'></div><br /><input type='button' onclick='_com(event,{$type},{$cid},{$owner});' style='float:right' class='button1' value='Comment'/></td></tr></table></div></div><a href='#' onclick='addCommentV(event)'><!--span class='__c'>Add a comment</span--></a></div></div>\n\t</div>" : "";
        break;
    case 2:
        if ($uid != 0) {
            $q = $con->insertInto("comment", array($type, $cid, $owner, $uid, $post, date("U")));
            $plate = 9 + $type;
            if ($uid != $owner) {
                $q = $con->insertInto("hist", array($plate, $owner, $uid, $cid, date("U")));
            }
            echo $q ? 1 : 2;
        }
        break;
    case 3:
        $q = mysqli_query($conc, "DELETE FROM comment WHERE (uid = {$uid} OR owner={$uid}) AND type={$type} AND id={$id}");
Ejemplo n.º 10
0
        $q = mysqli_query($conc, "UPDATE users SET np = '{$id}" . "__" . "{$type}', npdate=" . date("U") . " WHERE id = {$uid};");
    }
    @$con->close_db_con($conc);
    @$con->insertInto("num_plays", array($id, $type, $uid, date("U")));
    //	if($type == 1)					$con->update("music","play = play + 1","id = $id");
    //	if($type == 2)					$con->update("videos","play = play + 1","id = $id");
    //	if($type == 0)					$con->update("art","play = play + 1","id = $id");
    exit;
} else {
    if (isset($owner)) {
        $q = mysqli_query($conc, "SELECT np,npdate FROM users WHERE id = {$owner} ");
        $r = mysqli_fetch_array($q);
        $q = NULL;
        if ($r[0] == "") {
            exit;
        }
        list($id, $type) = explode("__", $r[0]);
        if ($type == 1) {
            $q = mysqli_query($conc, "SELECT music.id,music.user,music.name,music.info,music.mp3,music.dl,music.date,users.user FROM music INNER JOIN users ON users.id= music.user WHERE music.id = {$id}");
            $rr = mysqli_fetch_array($q);
            $res = "<a href='#!/music={$rr['0']}' name='modal'><span class='muzik_item' title='{$rr['3']}' mid='{$rr['0']}' onclick='playmusic(event)' mname='{$rr['2']}' info='{$rr['3']}' music='{$rr['4']}' mdate='" . gtime($rr[6]) . "' uid='{$rr['1']}' owner='{$rr['7']}'>{$rr['2']}</span></a>";
        } else {
            $q = mysqli_query($conc, "SELECT videos.id,videos.user,videos.name,videos.info,videos.pict,videos.vid,videos.dl,videos.date,users.user FROM `videos` INNER JOIN users ON users.id = videos.user WHERE videos.id = '{$id}' ");
            $rrr = mysqli_fetch_array($q);
            $res = "<a href='#!/video={$rrr['0']}' name='modal'><span class='vid_item' title='{$rrr['3']}' onclick='playvideo(event)' prev='{$rrr['4']}' video='{$rrr['5']}' info='{$rrr['3']}' vidname='{$rrr['2']}' vid='{$rrr['0']}' vdate='" . gtime($rrr[7]) . "' uid='{$rrr['1']}' owner='{$rrr['8']}'>{$rrr['2']}</span></a>";
        }
        $is_now = date("U") - $r[1] > 60 * 60 * 3 ? "Last played: " : "Now playing: ";
        echo $is_now . $res;
    }
}
$con->close_db_con($conc);
Ejemplo n.º 11
0
             } else {
                 $sm = false;
             }
             $res .= "<div><table cellspacing='5' cellpadding='3'><tr><td><img src='{$bb}/img/music_.png' /></td><td><a href='" . PTH . "/{$user}' onClick='return _pop(event,{$r['2']});'  >{$user}</a> commented on your <a href='#' onclick='hist_media({$var3},1)'>song</a></td><td><a  class='del' udate='{$r['5']}' title='" . date('r', $r[5]) . "'>" . gtime($r[5]) . "</a></td></tr></table></div>";
         }
         break;
     case 12:
         //video
         if ($uid == $r[1]) {
             $n++;
             if ($n < $page) {
                 continue;
             } else {
                 $sm = false;
             }
             $res .= "<div><table cellspacing='5' cellpadding='3'><tr><td><img src='{$bb}/img/video_.png' /></td><td><a href='" . PTH . "/{$user}' onClick='return _pop(event,{$r['2']});'  >{$user}</a> commented on your <a href='#' onclick='hist_media({$var3},2)'>video</a><td><a  class='del' udate='{$r['5']}' title='" . date('r', $r[5]) . "'>" . gtime($r[5]) . "</a></td></tr></table></div>";
         }
         break;
     default:
         //*yimu*//
         break;
 }
 if ($n < $page) {
     continue;
 } else {
     $sm = false;
 }
 if ($n == 20 + $page) {
     $sm = true;
     break;
 }
Ejemplo n.º 12
0
function post($id, $uid, $userid, $user, $name, $img, $date, $post, $var, $rid, $type, $client)
{
    $rp = "";
    if ($type == 1) {
        $con = new db();
        $conc = $con->c();
        $q = mysqli_query($conc, "SELECT `post`.`id`,`users`.`user` FROM `post` INNER JOIN `users` ON (`users`.`id` = `post`.`user`) WHERE `post`.`id` = {$rid} ");
        $r = mysqli_fetch_array($q);
        $pid = $r[1];
        $rp = "<a href='#' class='del'  onclick='return _op({$rid},{$type})' >in reply to {$pid}</a>";
        $con->close_db_con($conc);
    } else {
        if ($type == 2) {
            $con = new db();
            $conc = $con->c();
            $q = mysqli_query($conc, "SELECT `post`.`id`,`users`.`user` FROM `post` INNER JOIN `users` ON (`users`.`id` = `post`.`user`) WHERE `post`.`id` = {$rid} ");
            $r = mysqli_fetch_array($q);
            $pid = $r[1];
            $con->close_db_con($conc);
            $rp = "<a href='#pwindow' class='del' name='modal' onclick='return _op({$rid},{$type})' >rePosted From {$pid} </a>";
        }
    }
    $del = $uid == $userid ? "&middot;<a href='#' onclick='return _del(event,\"{$id}\")'><span class='del'>delete</span></a>" : "";
    if ($_SESSION["uid"] != 0) {
        $reply = "&middot;<a href='#' class='del' onclick='return _reply(event)' rid='{$id}' u='{$user}'> reply</a>";
        $repost = "&middot;<a href='#' class='del' onclick='return _repost(event)' rid='{$id}' u='{$user}'> repost</a>";
    }
    return "<div class='post' id='post{$id}'>\n\t\t\t\t\t<table><tr><td><a href='../home?i={$userid}' onclick='return _o(event,{$userid})' ><div class='smpdiv' style='background:url({$img}) center no-repeat'></div></a></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t<table><tr><td><a href='../home?i={$userid}' onclick='return _o(event,{$userid})' onmouseover='_pop(event,{$userid});' >{$user}</a> <i style='_pn'>{$name}</i><br/><span class='_post'>{$post}</span><br/>{$rp} <a href='#' target='_blank' class='del'>via {$client}</a> <a class='del' href='#?post={$id}' onclick='return _op({$id},0);'>" . gtime($date) . "</a><Br/>{$del} {$reply} {$repost}</td></tr></table>\n\t\t\t\t\t</td></tr></table>\n\t\t\t\t\t  </div> {$var}";
}
Ejemplo n.º 13
0
    $conc = $con->c();
    $qq = mysqli_query($conc, "SELECT * FROM `msg_subj` WHERE `u1` = '{$uid}' OR `u2` ='{$uid}' ORDER BY `id` DESC");
    if ($qq) {
        $result = "<div class='wp'><div style='width:550px;margin-left:10px;padding:30px 35px 35px 35px;'><table style='width:100%;'>";
        $numr = mysqli_num_rows($qq);
        if ($numr == 0) {
            die("<center class='m_s_g'><i>You have no messages in your inbox</i></center>");
        }
        while ($inf = mysqli_fetch_assoc($qq)) {
            $chknew = mysqli_query($conc, "SELECT `id`,`uid` FROM `msg` WHERE `cid` = " . $inf["id"] . " AND `new`=1 ORDER BY `id` DESC ");
            $num = mysqli_num_rows($chknew);
            $ltv = mysqli_fetch_array($chknew);
            if ($num > 0 && $ltv[1] != $uid) {
                $style = "style='background-color:" . $color_array[intval($_SESSION["color"])] . ";color:#fff;'";
                $newm = "<img src='./img/mg/ne.png' />";
            } else {
                $style = '';
                $newm = "<img src='" . PTH . "/img/mg/min.png' />";
            }
            $em = $inf["u1"] == $uid ? $inf["u2"] : $inf["u1"];
            $u = user($conc, "user,img1", $em);
            $flname = "{$u['0']}";
            $vart = gtime($inf["date"]);
            $result .= "<tr><td><a class='inb_a' href='#' onclick='shwmsg(" . $inf["id"] . ")'><span><table class='inb' {$style}><tr><td>{$newm}</td><td style='width:100px;'><div class='smpdiv' style='background:url(" . PTH . "{$u['1']}) no-repeat top left;' ></div></td><td style='width:400px;'><a href='./{$em}' target='_new' >{$flname}</a><br />" . $inf["subj"] . "<br/><span class='tt'>" . $vart . "</span></td></tr></table></span></a></td><td style='width:100px;'><a href='#'class='del' onclick='delconv(" . $inf["id"] . ",event)'><div class='delete' title='delete'></div></td></tr>";
        }
        $result .= "</table></div></div>";
    }
    echo $result;
    $con->close_db_con($conc);
}
exit;
Ejemplo n.º 14
0
         $res = "<div><a style='font-size:x-large;padding:0 30px 0 70px;' href='" . PTH . "'/music-{$rr['0']}' title='{$rr['3']}' class='music_m' onclick='_gomedia({$rr['0']},{$type});' >{$rr['2']} " . mediaplaycount(1, $mediaID) . "</a></div>\n\t\t\t\t\t" . '<br/><span style="font-size:20px;text-shadow:0 0 2px #333;">' . $rr[3] . '</span>' . "\n\t\t\t\t\t{$shr} <input type='hidden'  id='upid' value='{$rr['1']}'>\n\t\t\t\t\t" . $musicsrc . "\n\t\t\t\t\t<div class='subdiv'><P>Uploaded by <a href='" . PTH . "/{$rr['7']}' onclick='return _pop(event,\"{$rr['7']}\");'>{$rr['7']}</a></P>\t\t\t\t\t<i class='del'>" . gtime($rr[6]) . "</i><div id='comdiv'></div>";
         echo $res . "" . $endres . "</div>";
     } else {
         echo "<div class='m_s_g' style='padding:50px;'>The song you tried to access is not available.</div>";
     }
     break;
 case 3:
     $q = mysqli_query($conc, "SELECT  videos.id,videos.user,videos.name,videos.info,videos.pict,videos.vid,videos.dl,videos.date,users.user FROM `videos` INNER JOIN users ON users.id = videos.user WHERE videos.id = {$mediaID} ");
     if (mysqli_num_rows($q) == 1) {
         $rrr = mysqli_fetch_array($q);
         $title = $rrr[2];
         $user = $rrr[8];
         $vidoessrc = $ismobile == 2 ? '<div><video autoplay="autoplay" controls="controls" poster="' . PTH . '/prev/' . $rrr[4] . '" src="' . PTH . '/video/' . $rrr[5] . '" title="video may not play on your device"><source src="' . PTH . '/video/' . $rrr[5] . '" ></source></video></div>' : '<div style="width: 550px; height: 400px;" id="mediaplayer_wrapper"><object tabindex="0" name="mediaplayer" id="mediaplayer" bgcolor="#000000" data="' . PTH . '/player/player.swf" type="application/x-shockwave-flash" height="400" width="550"><param value="true" name="allowfullscreen"><param name="Movie" value="' . PTH . '/player/player.swf" /><param name="Src" value="' . PTH . '/player/player.swf"><param value="always" name="allowscriptaccess"><param value="true" name="seamlesstabbing"><param value="opaque" name="wmode"><param value="id=mediaplayer&amp;file=..%2Fvideo%2F' . $rrr[5] . '&amp;image=.%2Fprev%2F' . $rrr[4] . '&amp;controlbar.position=over&amp;title=' . $rrr[2] . '&amp;author=muzikkitchen.com&amp;description=' . $rrr[3] . '&amp;date=' . gtime($rrr[7]) . '" name="flashvars"><embed src="' . PTH . '/players/player.swf" height="400" width="550" /></object></div>';
         echo '<span style="font-size:x-large;text-shadow:0 0 2px #333;">' . $rrr[2] . ' ' . mediaplaycount(2, $mediaID) . '</span><br/><span style="font-size:20px;text-shadow:0 0 2px #333;">' . $rrr[3] . '</span>' . $vidoessrc;
         //<a href='#!/video=$rrr[0]'><li title='$rrr[3]' onclick='playvideo(event)' prev='$rrr[4]' video='$rrr[5]' vidname='$rrr[2]' vid='$rrr[0]' vdate='".gtime($rrr[7])."' owner='$rrr[8]' uid='$rrr[1]' class='vid_item' >$rrr[2]</li></a>
         echo "{$shr} <input type='hidden'  id='upid' value='{$rrr['1']}'>\n\t\t\t\t\t\t<div class='subdiv'><P>Uploaded by <a href='" . PTH . "/{$rrr['8']}' onclick='return _pop(event,\"{$rrr['8']}\");'>{$rrr['8']}</a></P></div><i class='del'>" . gtime($rrr[7]) . "</i>\n\t\t\t\t\t\t<div id='comdiv'></div>";
         $q = mysqli_query($conc, "SELECT videos.id,videos.user,videos.name,videos.info,videos.pict,videos.vid,videos.dl,videos.date,users.user FROM `videos` INNER JOIN users ON users.id = videos.user WHERE videos.user = {$rrr['1']} ");
         if (mysqli_num_rows($q) > 1) {
             echo "<div style='margin-top:20px;font-size:20px;'>Other videos by <a href='" . PTH . "/{$rrr['8']}' onclick='return _pop(event,\"{$rrr['8']}\");'>{$rrr['8']}</a></div>";
         }
         $n = 0;
         echo "<table><tr>";
         while ($r = mysqli_fetch_array($q)) {
             $n++;
             if ($rrr[0] == $r[0]) {
                 continue;
             }
             echo "<td ><a href='" . PTH . "/video-{$r['0']}' name='modal' onclick='return setURI(\"video\",{$r['0']})'><div style='background:url(" . PTH . "/img/load/ml.gif) no-repeat center;height:120px;width:120px;padding:10px;'><div style='background:url(" . PTH . "/prev/{$r['4']}) left;' class='vid_prev' title='{$r['3']}' onclick='_gomedia({$r['0']},{$type})'>{$r['2']}<br/>{$r['3']}</div></div></a><br/></td>";
             echo $n % 4 == 0 ? "</tr><tr>" : "";
         }
         echo "</tr></table>";