<?php
session_start();
global $base_url;
$BRD=browser();
//print_r($_COOKIE);
?>
<div id="msgdel"></div>
<div id="show_message" class="messages status" style="display:none;" align='left'></div>
<script src="<?php echo base_path()?>js/ajax_favrating.js" language="JavaScript" type="text/javascript"></script>
<div id="show_message" class="messages status" style="display:none;"></div>
<input type='hidden' id="cur_ts_new" value="<?php echo time(); ?>"/>
<input type='hidden' id="userlogb" value="1"/>
<?php
//include("./sites/default/config.php");
global $user;
$uid = $user->uid;
/*$back_image_width = "237";
$back_image_height = "162";
$image_width = "231";
$image_height = "155";*/
$back_image_width = "237";
$back_image_height = "162";
$image_width = "250";
$image_height = "312";
$i=0;
$totalpanestrip1=0;
?>
<?php
// Sanjay added
$ec = $_SERVER['HTTP_REFERER'];
$ec1 = explode('?',$ec);
$m_url = $ec1[0];
//print '<pre>';
//print_r($ec1);
?>
<?php
if($_REQUEST['ztyp']=='def' && $_REQUEST['typ']=='def')
{
$sql_stripp ="SELECT * FROM cheese_pans WHERE parent_strip='0' AND strip_status='running' AND frommystuff='0' ORDER BY pid DESC";
}
if($_REQUEST['ztyp']=='def' && $_REQUEST['typ']=='mostrecent')
{
$sql_stripp = "SELECT * FROM cheese_pans AS panes WHERE panes.parent_strip='0' AND panes.strip_status='running' AND frommystuff='0'";
$stripcond = " ORDER BY panes.created_date DESC";
}
if($_REQUEST['ztyp']=='def' && $_REQUEST['typ']=='mostpopular')
{
//$sql_stripp = "SELECT * FROM cheese_pans AS panes,mpopular_panes_rating AS panes_rating WHERE panes.parent_strip='0' AND panes.strip_status='running' AND frommystuff='0'";
$sql_stripp = "SELECT round( sum( vote.value ) / count( vote.content_id ) ) AS stripcount, vote.content_id, panes.pid, panes.uid, panes.nid, panes.parent_strip,panes.scr_name, panes.screen_name, panes.thumb1, panes.thumb2, panes.thumb3, panes.pane_type, panes.strip_status,panes.chapter_status, panes.created_date, panes.last_update_date, panes.cheese_default, panes.frommystuff FROM cheese_pans AS panes
LEFT JOIN votingapi_vote AS vote ON panes.nid = vote.content_id WHERE panes.frommystuff = '0' AND panes.parent_strip = '0' AND panes.strip_status='running' GROUP BY panes.pid ORDER BY stripcount DESC, panes.pid";
//$stripcond = " AND panes.pid=panes_rating.pid ORDER BY panes_rating.rating ASC";
}
if($_REQUEST['ztyp']=='def' && $_REQUEST['typ']!='def')
{
$sql_stripp.= $stripcond;
}
if($_REQUEST['ztyp']=='def' && $_REQUEST['typ']=='mostactive')
{
$sql_stripp = "SELECT * FROM cheese_pans AS panes WHERE panes.parent_strip='0' AND frommystuff='0' AND panes.strip_status='running' ORDER BY total_pane DESC";
}
//echo $sql_stripp;
$totalpane=0;
$sql_strip = @mysql_query($sql_stripp);
while($res_strip = @mysql_fetch_array($sql_strip))
{
$stripid = $res_strip['pid'];
echo "<input type='hidden' name='hid_stripmax".$stripid."' id='hid_stripmax".$stripid."' value=''>";
echo "<input type='hidden' name='hid_stripmax2".$stripid."' id='hid_stripmax2".$stripid."' value=''>";
$strip_nid = $res_strip['nid'];
$cdate = $res_strip['created_date'];
$stripdate = explode(" ",$cdate);
$ymdate =explode("-",$stripdate[0]);
$mainstrip_child = @mysql_query("SELECT * FROM cheese_pans WHERE parent_strip ='$stripid' ORDER BY pid ASC");
$mainstrip_res = @mysql_num_rows($mainstrip_child);
if($mainstrip_res>0)
{
$sql_lastrow = @mysql_query("SELECT * FROM cheese_pans WHERE parent_strip ='$stripid' ORDER BY pid DESC");
$data_lastrow = @mysql_fetch_array($sql_lastrow);
$count1 = mysql_num_rows($sql_lastrow);
$count = $count1 + 1;
}
$flag_sql = @mysql_query("SELECT * FROM flag_content WHERE uid='$uid' AND content_id='$stripid'");
$flag_nr = @mysql_num_rows($flag_sql);
$num_pane++;
?>
<input type="hidden" name="numpane[]" id="numpane" value="<?=$mainstrip_res?>">
<div id="strip_<?php echo $stripid;?>" />
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="3%" style="padding-top:75px;">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" align="right">
<?php
if($count >0 && $count <= 5)
{
?>
<a href="#"><img src="<?php print base_path().path_to_theme();?>/images/1_hirarchy.gif" border="none" id="statusimg" title="Strip hirarchy <?=$count?>"/></a>
<?php
}
if($count > 5 && $count <= 10)
{
?>
<a href="#"><img src="<?php print base_path().path_to_theme();?>/images/2_hirarchy.gif" border="none" id="statusimg" title="Strip hirarchy <?=$count?>"/></a>
<?php
}
if($count >10 && $count <= 15)
{
?>
<a href="#"><img src="<?php print base_path().path_to_theme();?>/images/3_hirarchy.gif" border="none" id="statusimg" title="Strip hirarchy <?=$count?>"/></a>
<?php
}
if($count >15 && $count <= 20)
{
?>
<a href="#"><img src="<?php print base_path().path_to_theme();?>/images/4_hirarchy.gif" border="none" id="statusimg" title="Strip hirarchy <?=$count?>"/></a>
<?php
}
if($count > 20)
{
?>
<a href="#"><img src="<?php print base_path().path_to_theme();?>/images/5_hirarchy.gif" border="none" id="statusimg" title="Strip hirarchy <?=$count?>"/></a>
<?php
}?>
</td>
</tr>
<tr>
<td height="25" align="right">
<!--
<a href="javascript:moveright('<?php echo $stripid; ?>','single')">
<img src="<?php print base_path().path_to_theme();?>/images/left_sin_arrow.gif" title="Left"/>
</a>
-->
<a href="javascript:void(0);"><span onMouseOver="moveright('<?php echo $stripid; ?>','single')" onMouseOut="stopabcdef();">
<img src="<?php print base_path().path_to_theme();?>/images/left_sin_arrow.gif" title="Left"/>
</span></a>
</td>
</tr>
<tr>
<td height="25" align="right">
<!--
<a href="javascript:moveright('<?php echo $stripid; ?>','double')">
<img src="<?php print base_path().path_to_theme();?>/images/left_db_arrow.gif" />
</a>
-->
<a href="javascript:void(0);"><span onMouseOver="moveright('<?php echo $stripid; ?>','double')" onMouseOut="stopabcdef();">
<img src="<?php print base_path().path_to_theme();?>/images/left_db_arrow.gif" title="Left"/>
</span></a>
</td>
</tr>
<tr>
<td height="25" align="right">
<?php
if($flag_nr > 0)
{
?>
<?php if($ec1[1] == 'theme=3') { ;?>
<a href="<?php print $m_url;?>" title="Remove this from your favorites" target="_top">
<?php } else { ?>
<a id='rate_pane<?php echo $stripid ?>' href="javascript:void(0)" onClick="rate_favs(<?php echo $stripid ?>, 'unflag', '<?php echo $user->uid; ?>')" title="Remove this from your favorites">
<?php } ?>
<img id="fav_icon_ajax<?php echo $stripid ?>" src="<?php print base_path().path_to_theme();?>/images/favourite_gray.jpg" border="none" />
</a>
<input type="hidden" id="screen<?php echo $stripid; ?>" value="<?php echo $res_strip['screen_name'] ?>" />
<input type="hidden" id="show_type<?php echo $stripid; ?>" value="unflag">
<?php
}
else
{
?>
<?php if($ec1[1] == 'theme=3') { ;?>
<a href="<?php print $m_url;?>" title="Add this to your favorites" target="_top">
<?php } else { ?>
<a id='rate_pane<?php echo $stripid ?>' href="javascript:void(0)" onClick="rate_favs(<?php echo $stripid ?>, 'flag', '<?php echo $user->uid; ?>')" title="Add this to your favorites">
<?php } ?>
<img id="fav_icon_ajax<?php echo $stripid ?>" src="<?php print base_path().path_to_theme();?>/images/favourite.gif" border="none" />
</a>
<input type="hidden" id="screen<?php echo $stripid ?>" value="<?php echo $res_strip['screen_name'] ?>">
<input type="hidden" id="show_type<?php echo $stripid ?>" value="flag">
<?php
}
?>
</td>
</tr>
</table>
</td>
<td width="94%" align="left" valign="top">
<?php
$wid = 277;
if($data_lastrow['chapter_status'] != "running")
{
$mainstrip_res=$mainstrip_res+1;
}
$total_content_width = (($mainstrip_res) * $wid);
//echo "cnt:".$mainstrip_res.", totl width: ".$total_content_width;
?>
<div class="bookmark_class_master" onMouseOver="get_whitespace('<?php echo $stripid; ?>')">
<div id="container<?php echo $stripid; ?>" class="class_for_container" >
<div id="content<?php echo $stripid; ?>" style="position:absolute;width:<?php echo $total_content_width; ?>px;left:0px;top:0px">
<ilayer name="nscontainer<?php echo $stripid; ?>" class="class_for_nscontainer">
<layer name="nscontent<?php echo $stripid; ?>" class="class_for_nscontent" >
<table border="0" cellspacing="0" cellpadding="0" width="<?php echo $total_content_width; ?>">
<tr>
<td valign="top">
<div >
<div class="bookmark_class_master bookmark_padding" onMouseOver="get_bookmark_id('<?php echo $stripid; ?>','0', '0', '<?php echo $_SERVER['REMOTE_ADDR']; ?>', '<?php echo $user->uid; ?>')">
<div style="width:300px;position:absolute;z-index:0;"><table width="100%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td nowrap="nowrap">
<span style="font-weight:bold; color:#000000;">
<?php
$mstripName = strlen($res_strip['screen_name']);
if($mstripName >50){
$stripName=substr($res_strip['screen_name'],0,50);
echo $stripName."..."." - ";
}else{
echo $res_strip['screen_name'];
}
?>
</span>
<?php
echo "-";
?>
</td>
<td width="100%" align="left"><?php
echo $ymdate[1]."/".$ymdate[2]."/".$ymdate[0];
?>
</td>
<td nowrap="nowrap">
<div align="right" style="padding-top:7px;">
<?php if($ec1[1] == 'theme=3') { ;?>
<a href="<?php print $m_url;?>" target="_top">Embed Strip</a>
<?php } else { ?>
<a href="<?php print 'http://cheese9.com/embed.php?stripid='.$stripid.'&keepThis=true&TB_iframe=true&height=250&width=440&';?>" class="thickbox">Embed Strip</a>
<?php } ?>
<!--<a href="#">
<img src="<?php print base_path().path_to_theme();?>/images/rate.gif" />
</a>
<a href="#">
<img src="<?php print base_path().path_to_theme();?>/images/smile.gif" />
</a>-->
<?php
$ip_source = $_SERVER['REMOTE_ADDR'];
$allow ='';
$nid=$strip_nid;
$rating = mysql_query("SELECT * FROM `votingapi_vote` WHERE vote_source='$ip_source' and uid='$uid' and content_id='$nid'");
$rate = mysql_fetch_array($rating);
$num = mysql_num_rows($rating);
if($num > 0 )
{
$allow = 0;
}else{
$allow = 1;
}
//setcookie("checksum-$nid","", time()+3600);
setcookie("allow_rating-$nid","", time()+3600);
if (isset($_COOKIE["checksum-$nid"]) && $_COOKIE["checksum-$nid"] == '0') {
//if (isset($_SESSION['checksum-'.$nid])) {
//$_SESSION['allow_rating-'.$nid]=0;
$_COOKIE["allow_rating-$nid"]=0;
//setcookie("checksum-$nid","0", time()+3600);
}
else {
//$_SESSION['allow_rating-'.$nid]=1;
$_COOKIE["allow_rating-$nid"]=1;
//setcookie("checksum-$nid","1", time()+3600);
}
$sql_avr = mysql_fetch_array(mysql_query("SELECT sum(`value`) AS stripsum, count(content_id) AS stripcount FROM `votingapi_vote` WHERE content_id='$nid'"));
$sum_of_strip = $sql_avr['stripsum'];
$count_of_strip = $sql_avr['stripcount'];
$average = round(($sum_of_strip/$count_of_strip));
$crate = $average;
//echo "avr:-".$crate;
?>
<?php if($ec1[1] == 'theme=3') { ;?>
<?php } else { ?>
<?php
echo "<strong>Rate the strip<strong>";
?>
<embed src="php/rate.swf?ip=<?php echo $_SERVER['REMOTE_ADDR'];?>&nid=<?php echo $nid;?>&uid=<?php echo $uid;?>&crate=<?php echo $crate;?>&allow=<?php echo $_COOKIE['allow_rating-'.$nid];?>" width="150" height="20" align="middle" quality="high" bgcolor="#ffffff" name="rate" allowScriptAccess="sameDomain" allowFullScreen="false" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="exactfit" />
<?php } ?>
</div>
</td>
</tr>
</table></div>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div class="strip_layer">
<div id="box1">
<div id="smallbox1" class="image_container123" onMouseOver="getID('<?php echo $stripid;?>',document.getElementById('votaddid').value,'<?php echo $uid;?>','fiddlestick');" onMouseOut="hide_menu(this.id);">
<?php if($ec1[1] == 'theme=3') { ;?>
<a href="http://cheese9.com" TARGET="_parent"> <img src="<?php print base_path();?>files/pans/Thumb_1/<?=$res_strip['thumb1']?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" border="none" <?php/* if($BRD!="MSIE"){?> style="display:none;" <?php }*/?> id="im_strip_<?php echo $stripid;?>"/></a>
<center> <span id="l_strip_<?php echo $stripid;?>" <?php /*if($BRD=="MSIE"){?> style="display:none;" <?php }*/?> >
<img src="<?php print base_path();?>files/loader.gif" style="padding-top:150px; " />
<br /><br /> Loading ...<br>
<embed src="<?php print base_path();?>load.swf?id=<?php echo $stripid;?>" width="1" height="1" align="middle" quality="high" bgcolor="#ffffff" name="load" allowScriptAccess="sameDomain" allowFullScreen="false" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="exactfit" /></embed>
</span></center>
<?php } else {?>
<img src="<?php print base_path();?>files/pans/Thumb_1/<?=$res_strip['thumb1']?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" border="none" <?php if($BRD!="MSIE"){?> style="display:none;" <?php }?> id="im_strip_<?php echo $stripid;?>"/>
<center> <span id="l_strip_<?php echo $stripid;?>" <?php if($BRD=="MSIE"){?> style="display:none;" <?php }?> >
<img src="<?php print base_path();?>files/loader.gif" style="padding-top:150px; " />
<br /><br /> Loading ...<br>
<embed src="<?php print base_path();?>load.swf?id=<?php echo $stripid;?>" width="1" height="1" align="middle" quality="high" bgcolor="#ffffff" name="load" allowScriptAccess="sameDomain" allowFullScreen="false" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="exactfit" /></embed>
</span></center>
<?php
}?>
</div>
<div style="float:right"><input type='text' name="bmstrip_<?php echo $stripid; ?>" id="bmstrip_<?php echo $stripid; ?>" value="bmstrip_<?php echo $stripid; ?>" style="border:0px solid #ffffff;width:0px;height:0px;"></div>
<div id="smallbox" class="small_text">
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="left" valign="top">
<!--<a href="javascript:void(0)" onClick="viewsubmission('strip_<?=$stripid?>','<?=$stripid?>','<?=$mainstrip_res?>')" class="header-link">View Submissions</a>-->
</td>
<td align="right" valign="top">
<?php
$sql_role = mysql_query("SELECT * FROM users_roles WHERE rid='3' ORDER BY rid");
while($sql_role1=mysql_fetch_array($sql_role))
{
$rid = $sql_role1['uid'];
if($uid == $rid)
{
?>
<?php if($ec1[1] == 'theme=3') { ;?>
<a href="<?php print $m_url;?>" target="_top"> Delete | </a>
<?php } else { ?>
<a href="javascript:void(0)" onClick="ConfirmDelete(<?=$stripid?>)"> Delete | </a>
<?php } ?>
<?php
}
}
?>
<?php if($ec1[1] == 'theme=3') { ;?>
<a href="<?php print $m_url;?>" target="_top">Embed</a>
<?php } else { ?>
<a href="<?php print 'http://cheese9.com/embed.php?stripid1='.$stripid.'&keepThis=true&TB_iframe=true&height=250&width=400&';?>" class="thickbox">Embed</a>
<?php } ?>
</td>
</tr>
</table>
</div>
</div></div>
</td>
</tr>
</table>
</div>
</div>
</td>
<?php
//echo "SELECT * FROM cheese_pans WHERE parent_strip ='$stripid' ORDER BY pid ASC";
$sql_strip1 = @mysql_query("SELECT * FROM cheese_pans WHERE parent_strip ='$stripid' ORDER BY pid ASC");
$pane_num = @mysql_num_rows($sql_strip1);
$grayboxcond = $pane_num;
$host_ip = $_SERVER['REMOTE_ADDR'];
$today = time();
$visitor_ip = $_SESSION['ip'];
while($res_strip1 = @mysql_fetch_array($sql_strip1))
{
if (isset($_COOKIE['user-log']) && $_COOKIE['user-log'] == '1') {
if (strtotime($res_strip1['created_date']) > $_COOKIE['last-accessed']) {
//$paneindication = date("Y-m-d h:i:s",$_SESSION['user_time']);
$newclass = "box_red";
$alt = "New Pane";
//$_COOKIE['user-log']='0';
}
else {
$newclass = "null";
$alt = "";
}
}
$grayboxcond--;
$paneid = $res_strip1['pid'];
$ch_status = $res_strip1['chapter_status'];
$str_status = $res_strip1['strip_status'];
$childstatus = $res_strip1['pane_type'];
$mainpane_child = @mysql_query("SELECT * FROM cheese_pans WHERE parent_strip ='$paneid' ORDER BY pid DESC");
$mainpane_res = @mysql_num_rows($mainpane_child);
?>
<td valign="top">
<div id="strip_<?php echo $paneid;?>" />
<div>
<div class="bookmark_class_master bookmark_padding" onMouseOver="get_bookmark_id('<?php echo $stripid; ?>','<?php echo $paneid; ?>', '0', '<?php echo $_SERVER['REMOTE_ADDR']; ?>', '<?php echo $user->uid; ?>')">
<input type="hidden" name="last_pane" id="last_pane_<?php echo $stripid; ?>" value="<?php echo $paneid; ?>">
<table border="0" cellspacing="0" cellpadding="0" >
<tr>
<td>
<div class="strip_layer"> <div id="box1">
<div id="smallbox1" class="image_container123" onMouseOver="getID('<?php echo $paneid;?>',document.getElementById('votaddid').value,'<?php echo $uid;?>','fiddlestic');" onMouseOut="hide_menu(this.id);">
<?php
//For showing the most rated pane at the top.
$sql_mr = @mysql_query("SELECT round( sum( vote.value ) / count( vote.content_id ) ) AS stripcount, vote.content_id, panes.pid, panes.uid,panes.nid, panes.parent_strip, panes.scr_name, panes.screen_name, panes.thumb1, panes.thumb2, panes.thumb3, panes.pane_type,panes.strip_status, panes.chapter_status, panes.created_date, panes.last_update_date, panes.cheese_default, panes.frommystuff FROM cheese_pans AS panes LEFT JOIN votingapi_vote AS vote ON panes.nid = vote.content_id WHERE panes.parent_strip='$paneid' GROUP BY panes.pid ORDER BY stripcount DESC, panes.pid LIMIT 0,1");
$res_mr = @mysql_fetch_array($sql_mr);
$paneid_mr = $res_mr["pid"];
?>
<?php if($ec1[1] == 'theme=3') { ;?>
<a href="http://cheese9.com" TARGET="_parent">
<span id="im_strip_<?php echo $paneid;?>" <?php if($BRD!="MSIE"){?> style="display:none;" <?php }?> >
<img src="<?php print base_path();?>files/pans/Thumb_1/<?=$res_mr['thumb1']?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" border="none" id="<?php echo $newclass; ?>" alt="<?php echo $alt; ?>" title="<?php echo $alt; ?>"/>
</span></a>
<center><span id="l_strip_<?php echo $paneid;?>" <?php if($BRD=="MSIE"){?> style="display:none;" <?php }?> >
<img src="<?php print base_path();?>files/loader.gif" style="padding-top:150px; " />
<br /><br /> Loading ...<br>
<embed src="<?php print base_path();?>load.swf?id=<?php echo $paneid;?>" width="1" height="1" align="middle" quality="high" bgcolor="#ffffff" name="load" allowScriptAccess="sameDomain" allowFullScreen="false" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="exactfit" /></embed>
</span></center>
<?php } else {?>
<span id="im_strip_<?php echo $paneid;?>" <?php if($BRD!="MSIE"){?> style="display:none;" <?php }?> >
<!--
<img src="<?php //print base_path();?>files/pans/Thumb_1/<?//=$res_strip1['thumb1']?>" width="<?php //echo $image_width; ?>" height="<?php //echo $image_height; ?>" border="none" id="<?php //echo $newclass; ?>" alt="<?php //echo $alt; ?>" title="<?php //echo $alt; ?>" />
-->
<img src="<?php print base_path();?>files/pans/Thumb_1/<?=$res_mr['thumb1']?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" border="none" id="<?php echo $newclass; ?>" alt="<?php echo $alt; ?>" title="<?php echo $alt; ?>"/>
</span>
<center> <span id="l_strip_<?php echo $paneid;?>" <?php if($BRD=="MSIE"){?> style="display:none;" <?php }?> >
<img src="<?php print base_path();?>files/loader.gif" style="padding-top:150px; " />
<br /><br /> Loading ...<br>
<embed src="<?php print base_path();?>load.swf?id=<?php echo $paneid;?>" width="1" height="1" align="middle" quality="high" bgcolor="#ffffff" name="load" allowScriptAccess="sameDomain" allowFullScreen="false" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="exactfit" /></embed>
</span></center>
<?php } ?>
</div>
<div style="float:right"><input type='text' name="bmstrip_<?php echo $paneid; ?>" id="bmstrip_<?php echo $paneid; ?>" value="bmstrip_<?php echo $paneid; ?>" style="border:0px solid #ffffff;width:0px;height:0px;"></div>
<div id="smallbox" class="small_text">
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="left" valign="top">
<?php
/*if($ch_status != running)
{
$mainpane_res++;
?>.
<a href="javascript:void(0)" onClick="viewsubmission('strip_<?=$paneid?>','<?=$stripid?>','<?=$mainpane_res?>')" class="header-link">View Submissions<img id="arrow_<?php echo 'strip_'.$paneid; ?>" src="<?php print base_path().path_to_theme();?>/images/down_arrow.gif" alt="Down Arrow" width="10" height="8" border="0" align="absmiddle" /></a>
<?php
} */
if($grayboxcond =='0' && $ch_status == running)
{
?>
<a href="javascript:void(0)" onClick="viewsubmission('strip_<?=$paneid?>','<?=$stripid?>','<?=($mainpane_res+2)?>')" class="header-link">Vote/add<img id="arrow_<?php echo 'strip_'.$paneid; ?>" src="<?php print base_path().path_to_theme();?>/images/down_arrow.gif" alt="Down Arrow" width="10" height="8" border="0" align="absmiddle" /></a>
<?php
}else{
$mainpane_res++;
?>
<a href="javascript:void(0)" onClick="viewsubmission('strip_<?=$paneid?>','<?=$stripid?>','<?=$mainpane_res?>')" class="header-link">View Submissions<img id="arrow_<?php echo 'strip_'.$paneid; ?>" src="<?php print base_path().path_to_theme();?>/images/down_arrow.gif" alt="Down Arrow" width="10" height="8" border="0" align="absmiddle" /></a>
<?php
}?>
</td>
<td align="right" valign="top">
<?php
$sql_role = mysql_query("SELECT * FROM users_roles WHERE rid='3' ORDER BY rid");
while($sql_role1=mysql_fetch_array($sql_role))
{
$rid = $sql_role1['uid'];
if($uid == $rid)
{
?>
<?php if($ec1[1] == 'theme=3') { ;?>
<a href="<?php print $m_url;?>" target="_top"> Delete | </a>
<?php } else { ?>
<a href="javascript:void(0)" onClick="ConfirmDelete(<?=$paneid?>)">Delete | </a>
<?php } ?>
<?php
}
}
?>
<?php if($ec1[1] == 'theme=3') { ;?>
<a href="<?php print $m_url;?>" target="_top">Embed</a>
<?php } else { ?>
<a href="<?php print 'http://cheese9.com/embed.php?stripid1='.$paneid.'&keepThis=true&TB_iframe=true&height=250&width=400&';?>" class="thickbox">Embed</a>
<?php } ?>
</td>
</tr>
</table>
</div>
</div>
</div></div>
</td>
</tr>
</table>
</div>
</div>
</div>
<br>
<div id="strip_<?php echo $paneid;?>_full" style="display:none;" >
<?php
if($ch_status == "running")
{
$voteAdd = $paneid;
?>
<div>
<div>
<div class="bookmark_class_master bookmark_padding" onMouseOver="get_bookmark_id('<?php echo $stripid; ?>','<?php echo $paneid; ?>', '0', '<?php echo $_SERVER['REMOTE_ADDR']; ?>', '<?php echo $user->uid; ?>')">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div ><div id="box1">
<div id="smallbox1" class="image_container123" onMouseOver="getID('strip_<?php echo $paneid; ?>_blank'),votaddid('<?=$voteAdd?>')" onMouseOut="hide_menu(this.id);">
<div id="strip_<?php echo $paneid; ?>_blank" style="background-color:#fcfcd4;width:<?php echo $image_width; ?>px; height:<?php echo $image_height; ?>px; align:center;">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="5">
<tr><td align="center">
<?php if($ec1[1] == 'theme=3') { ;?>
"Right click" any pane using your mouse and select "copy" for editing to this box and "paste" to pane or click [<a id="adp<?php echo $paneid; ?>" href="http://cheese9.com" TARGET="_parent" title="Create Pane">here</a>] to create your own.
<?php } else {
//***************************************down****************************************
?>
<!--"Right click" any pane using your mouse and select "copy" for editing to this box and "paste" to pane or click [<a id="adp<?php echo $paneid; ?>" href="#TB_inline?height=125&width=430&inlineId=create_new_pane_common" class="thickbox" title="Create Pane">here</a>] to create your own.-->
"Right click" any pane using your mouse and select "copy" for editing to this box and "paste" to pane or click [<a id="adp<?php echo $paneid; ?>" href="javascript:add_pane(<?=$paneid?>,<?=$uid?>,'NP','fiddlestick','')" title="Create Pane">here</a>] to create your own.
<?php
}
//***************************************end down****************************************
?>
</td></tr>
</table>
<?php
//echo "SELECT * FROM users_roles WHERE rid='3' ORDER BY rid";
$sql_roledw = mysql_query("SELECT * FROM users_roles WHERE rid='3' ORDER BY rid");
while($sql_role1w=mysql_fetch_array($sql_roledw))
{
$ridw = $sql_role1w['uid'];
if($uid == $ridw)
{
$mangstrip =mysql_fetch_array(mysql_query("SELECT * FROM cheese_pans WHERE pid='$stripid'"));
$mgid = $mangstrip['pid'];
$namestrip = $mangstrip['screen_name'];
$name = "<b>".$namestrip."</b>";
$mangstripDatee = $mangstrip['created_date'];
$cdate= explode(" ",$mangstripDatee);
$time = $cdate[1];
$dateexp=explode("-",$cdate[0]);
$y=$dateexp[0];
$m=$dateexp[1];
$d=$dateexp[2];
$mangstripDate = $m."/".$d."/".$y." ".$time;
?>
<tr><td align="right" valign="top">
<?php if($ec1[1] == 'theme=3') { ?>
<a id="mngpane<?php echo $mgid; ?>" href="<?php print $m_url;?>" target="_top">Manage</a>
<?php } else { ?>
<a id="mngpane<?php echo $mgid; ?>" href="#TB_inline?height=200&width=500&stripid=<?=$mgid?>&inlineId=manage_pane" class="thickbox" title="Strip Management" OnClick="setpid_mturk('btm_ys','<?=$paneid?>'); manage_strip('<?=$mgid?>','<?=$name?>','<?=$mangstripDate?>');">Manage</a>
<input type="hidden" name="hid_pid_mturk" id="hid_pid_mturk" value="">
<?php } ?>
</td></tr>
<?php
}
}
?>
</div>
</div>
</div></div>
</td>
</tr>
</table>
</div>
</div>
</div>
<?php
}
$sql_strip2 = @mysql_query("SELECT round( sum( vote.value ) / count( vote.content_id ) ) AS stripcount, vote.content_id, panes.pid, panes.uid,panes.nid, panes.parent_strip, panes.scr_name, panes.screen_name, panes.thumb1, panes.thumb2, panes.thumb3, panes.pane_type,panes.strip_status, panes.chapter_status, panes.created_date, panes.last_update_date, panes.cheese_default, panes.frommystuff FROM cheese_pans AS panes LEFT JOIN votingapi_vote AS vote ON panes.nid = vote.content_id WHERE panes.parent_strip='$paneid' GROUP BY panes.pid ORDER BY stripcount DESC, panes.pid");
while($res_strip2 = @mysql_fetch_array($sql_strip2))
{
$child = $res_strip2['pid'];
if (isset($_COOKIE['user-log']) && $_COOKIE['user-log'] == '1') {
if (strtotime($res_strip2['created_date']) > $_COOKIE['last-accessed']) {
//$paneindication = date("Y-m-d h:i:s",$_SESSION['user_time']);
$newclass = "box_red";
$alt = "New Pane";
//$_COOKIE['user-log']='0';
}
else {
$newclass = "null";
$alt = "";
}
}
?>
<div id="strip_<?php echo $child;?>" />
<div>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div class="bookmark_class_master bookmark_padding" onMouseOver="get_bookmark_id('<?php echo $stripid; ?>','<?php echo $paneid; ?>', '0', '<?php echo $_SERVER['REMOTE_ADDR']; ?>', '<?php echo $user->uid; ?>')">
<div id="box1">
<div id="smallbox1" class="image_container123" onMouseOver="getID('<?php echo $child;?>',document.getElementById('votaddid').value,'<?php echo $uid;?>','fiddlestick');"
onMouseOut="hide_menu(this.id);">
<?php if($ec1[1] == 'theme=3') { ;?>
<a href="http://cheese9.com" TARGET="_parent"><img src="<?php print base_path();?>files/pans/Thumb_1/<?=$res_strip2['thumb1']?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" border="none" id="<?php echo $newclass;?>" alt="<?php echo $alt; ?>" title="<?php echo $alt; ?>"/></a>
<?php } else {?>
<img src="<?php print base_path();?>files/pans/Thumb_1/<?=$res_strip2['thumb1']?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" border="none" id="<?php echo $newclass;?>" alt="<?php echo $alt; ?>" title="<?php echo $alt; ?>"/>
<?php
}?>
</div></div>
<div style="float:right"><input type='text' name="bmstrip_<?php echo $child; ?>" id="bmstrip_<?php echo $child; ?>" value="bmstrip_<?php echo $child; ?>" style="border:0px solid #ffffff;width:0px;height:0px;"></div></div>
</td>
</tr>
<tr><td>
<?php
$ip_source = $_SERVER['REMOTE_ADDR'];
$allow ='';
$ave = 0;
$nid=$res_strip2['nid'];
//echo "chk"."checksum-".$nid;
$rating = mysql_query("SELECT * FROM `votingapi_vote` WHERE vote_source='$ip_source' and uid='$uid' and content_id='$nid'");
$rate = mysql_fetch_array($rating);
$num = mysql_num_rows($rating);
if($num > 0 )
{
$allow = 0;
}else{
$allow = 1;
}
//setcookie("checksum-$nid","", time()+3600);
setcookie("allow_rating-$nid","", time()+3600);
if (isset($_COOKIE["checksum-$nid"]) && $_COOKIE["checksum-$nid"]=='0') {
$_COOKIE["allow_rating-$nid"]=0;
}
else {
$_COOKIE["allow_rating-$nid"]=1;
}
$sql_avr = mysql_fetch_array(mysql_query("SELECT sum(`value`) AS stripsum, count(content_id) AS stripcount FROM `votingapi_vote` WHERE content_id='$nid'"));
$sum_of_strip = $sql_avr['stripsum'];
$count_of_strip = $sql_avr['stripcount'];
$ave = round(($sum_of_strip/$count_of_strip));
$crate = $ave;
if($ch_status == "running")
{?>
<?php if($ec1[1] == 'theme=3') { ;?>
<?php } else {
echo "<strong>Rate</strong>";
?>
<embed src="php/rate.swf?ip=<?php echo $_SERVER['REMOTE_ADDR'];?>&nid=<?php echo $nid;?>&uid=<?php echo $uid;?>&crate=<?php echo $crate;?>&allow=<?php echo $_COOKIE['allow_rating-'.$nid];?>" width="150" height="20" align="middle" quality="high" bgcolor="#ffffff" name="rate" allowScriptAccess="sameDomain" allowFullScreen="false" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="exactfit" /></embed>
<?php } ?>
</td></tr>
<?php
}else{?>
<?php if($ec1[1] == 'theme=3') { ;?>
<?php } else { ?>
<embed src="php/rate.swf?ip=<?php echo $_SERVER['REMOTE_ADDR'];?>&nid=<?php echo $nid;?>&uid=<?php echo $uid;?>&crate=<?php echo $crate;?>&allow=0&r=0&a=b" width="150" height="20" align="middle" quality="high" bgcolor="#ffffff" name="rate" allowScriptAccess="sameDomain" allowFullScreen="false" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="exactfit" /></embed>
<?php } ?>
</td></tr>
<?php
}?>
</table>
</div>
</div>
<?php
}
?>
</div>
</td>
<?php
}
$panenumber = $totalpanestrip1;
$totalpanestrip1=0;
$sql_stripYell = @mysql_query("SELECT * FROM cheese_pans WHERE parent_strip ='$stripid' ORDER BY pid DESC");
$sqlvote = mysql_fetch_array($sql_stripYell);
$pane_numYell = @mysql_num_rows($sql_stripYell);
if($pane_numYell == '')
{
$ch_status= '';
$voteadd = $stripid;
}else{
$voteadd = $sqlvote['pid'];
}
if($ch_status != "running")
{
?>
<td valign="top">
<div class="bookmark_class_master bookmark_padding" onMouseOver="get_bookmark_id('<?php echo $stripid; ?>','<?php echo $paneid; ?>', '0', '<?php echo $_SERVER['REMOTE_ADDR']; ?>', '<?php echo $user->uid; ?>'),votaddid('<?=$voteadd?>')">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div class="strip_layer">
<div id="box1">
<div id="smallbox1" class="image_container123" onMouseOver="getID('strip_<?php echo $stripid; ?>_blank');" onMouseOut="hide_menu(this.id);">
<div id="strip_<?php echo $stripid; ?>_blank" style="background-color:#fcfcd4;width:<?php echo $image_width; ?>px; height:<?php echo $image_height; ?>px; align:center;">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="5">
<tr><td align="center">
<?php if($ec1[1] == 'theme=3') { ;?>
"Right click" any pane using your mouse and select "copy" for editing to this box and "paste" to pane or click [<a id="adp<?php echo $stripid; ?>" href="http://cheese9.com" TARGET="_parent" title="Create Pane">here</a>] to create your own.
<?php } else {
//*************************************right side************************************
?>
<!--"Right click" any pane using your mouse and select "copy" for editing to this box and "paste" to pane or click [<a id="adp<?php echo $stripid; ?>" href="#TB_inline?height=125&width=430&pid=<?php echo $paneid; ?>&inlineId=create_new_pane_common" class="thickbox" title="Create Pane">here</a>] to create your own.-->
"Right click" any pane using your mouse and select "copy" for editing to this box and "paste" to pane or click [<a id="adp<?php echo $stripid; ?>" href="javascript:add_pane(<?=$stripid?>,<?=$uid?>,'NP','fiddlestick','')" title="Create Pane">here</a>] to create your own.
<?php }
//*************************************end right side************************************
?>
</td></tr>
</table>
<?php
$sql_role = mysql_query("SELECT * FROM users_roles WHERE rid='3' ORDER BY rid");
while($sql_role1=mysql_fetch_array($sql_role))
{
$rid = $sql_role1['uid'];
if($uid == $rid)
{
$mangstrip =mysql_fetch_array(mysql_query("SELECT * FROM cheese_pans WHERE pid='$stripid'"));
$mgid = $mangstrip['pid'];
$namestrip = $mangstrip['screen_name'];
$name = "<b>".$namestrip."</b>";
$mangstripDatee = $mangstrip['created_date'];
$cdate= explode(" ",$mangstripDatee);
$time = $cdate[1];
$dateexp=explode("-",$cdate[0]);
$y=$dateexp[0];
$m=$dateexp[1];
$d=$dateexp[2];
$mangstripDate = $m."/".$d."/".$y." ".$time;
?>
<tr><td align="right" valign="top">
<?php if($ec1[1] == 'theme=3') { ?>
<a id="mngpane<?php echo $stripid; ?>" href="<?php print $m_url;?>" target="_top">Manage</a>
<?php } else { ?>
<a id="mngpane<?php echo $stripid; ?>" href="#TB_inline?height=200&width=500&stripid=<?=$mgid?>&inlineId=manage_pane" class="thickbox" title="Strip Management" OnClick="setpid_mturk('',''); manage_strip('<?=$mgid?>','<?=$name?>','<?=$mangstripDate?>');">Manage</a>
<?php } ?>
</td></tr>
<?php
}
}
?>
</div>
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
<?php
}
?>
</tr>
</table>
</layer>
</ilayer>
</div>
</div>
</div>
<!-- strip end -->
</td>
<td width="3%" align="right" valign="top" style="padding-top:75px;">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" align="left"> </td>
</tr>
<tr>
<td height="25" align="left">
<!--<a href="javascript:moveleft('<?php echo $stripid; ?>','single')">
<img src="<?php print base_path().path_to_theme();?>/images/right_sin_arrow.gif" />
</a>-->
<a href="javascript:void(0);"><span onMouseOver="moveleft('<?php echo $stripid; ?>','single')" onMouseOut="stopabcdef();">
<img src="<?php print base_path().path_to_theme();?>/images/right_sin_arrow.gif" title="Right"/>
</span></a>
</td>
</tr>
<tr>
<td height="25" align="left">
<!--
<a href="javascript:moveleft('<?php echo $stripid; ?>','double')">
<img src="<?php print base_path().path_to_theme();?>/images/right_db_arrow.gif" />
</a>
-->
<a href="javascript:void(0);"><span onMouseOver="moveleft('<?php echo $stripid; ?>','double')" onMouseOut="stopabcdef();">
<img src="<?php print base_path().path_to_theme();?>/images/right_db_arrow.gif" title="Right"/>
</span></a>
</td>
</tr>
<tr>
<td height="25"> </td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<?php
}
?>
<input type="hidden" name="numpane" id="numpane" value="<?=$totalpane?>">
<input type="hidden" name="totalpane" id="totalpane" value="<?=$grayboxcond?>">
<?php
//session_unset();
?>