73 lines
2.9 KiB
PHP
73 lines
2.9 KiB
PHP
|
|
<?php if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/include/analytics/');
|
||
|
|
|
||
|
|
include(PATHTOINCLUDES."base.php");
|
||
|
|
|
||
|
|
$page = "bator_training1";
|
||
|
|
include "header.php";
|
||
|
|
|
||
|
|
if(isset($_POST['id'])) { $id = $_POST['id']; } elseif(isset($_GET['id'])) { $id = $_GET['id']; } else { $id = ""; }
|
||
|
|
|
||
|
|
//$terms_of_service = SE_Language::get(1210);
|
||
|
|
|
||
|
|
// SET GLOBAL PAGE TITLE/DESCRIPTION
|
||
|
|
$select="";
|
||
|
|
$query=$database->database_query("SELECT * FROM bateworldcom_zips.bator_training WHERE approved=1 order by id");
|
||
|
|
while($row=$database->database_fetch_array($query))
|
||
|
|
{
|
||
|
|
$select.="<option value='".$row["id"]."'";
|
||
|
|
if($row["id"]==$id){$select.=" selected='selected'";
|
||
|
|
}
|
||
|
|
$select.=">".$row["title"]."</option>";
|
||
|
|
|
||
|
|
}
|
||
|
|
if($id!=""){
|
||
|
|
$query=$database->database_query("SELECT * FROM bateworldcom_zips.bator_training WHERE approved=1 AND id={$id}");
|
||
|
|
$row=$database->database_fetch_array($query);
|
||
|
|
}
|
||
|
|
else{
|
||
|
|
$query=$database->database_query("SELECT * FROM bateworldcom_zips.bator_training WHERE approved=1 ORDER BY id DESC LIMIT 1");
|
||
|
|
$row=$database->database_fetch_array($query);
|
||
|
|
$id=$row["id"];
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
$msize=ini_get('upload_max_filesize');
|
||
|
|
|
||
|
|
$commentcount = $database->database_result($database->database_query("SELECT COUNT(*) FROM batortrainingcomments WHERE object_id='".$id."'"),0);
|
||
|
|
|
||
|
|
function grabcomments()
|
||
|
|
{
|
||
|
|
global $url, $id, $database;
|
||
|
|
$query = $database->database_query("SELECT * FROM batortrainingcomments WHERE object_id='".$id."' ORDER BY id DESC");
|
||
|
|
while($row=$database->database_fetch_array($query))
|
||
|
|
{
|
||
|
|
$owner1=new SEUser(Array($row["authoruser_id"]));
|
||
|
|
|
||
|
|
?>
|
||
|
|
<div style="margin-top: 10px; margin-bottom: 20px;"><div style="float: left; text-align: center; width: 90px;"><a href="<?=$url->url_create('profile', $owner1->user_info["user_username"])?>">
|
||
|
|
|
||
|
|
<?php $profilepicture=$owner1->user_photo("./images/nophoto.png");
|
||
|
|
echo $owner1->userprofiledot($profilepicture, "75px");?>
|
||
|
|
|
||
|
|
</a></div><div style="overflow: hidden;"><div class="profile_comment_author"><a href="<?=$url->url_create('profile', $owner1->user_info["user_username"])?>"><b><?=$owner1->user_displayname?></b></a></div><div class="profile_comment_date"><?=date('n/j/Y g:i A', $row["date"])?></div><div class="profile_comment_body" id="profile_comment_body_14612"><?=$row["body"]?></div><div class="profile_comment_links"><a data-toggle="modal" data-target="#myModal" href="user_messages_new.php?to_user=<?=$owner->user_info["user_username"]?>&to_id=<?=$owner->user_info["user_username"]?>">message</a> </div></div></div>
|
||
|
|
<?
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
// ASSIGN VARIABLES AND INCLUDE FOOTER
|
||
|
|
|
||
|
|
$smarty->assign('thetitle', 'Bator Training');
|
||
|
|
$smarty->assign('id', $id);
|
||
|
|
$smarty->assign('select', $select);
|
||
|
|
$smarty->assign('commentcount', $commentcount);
|
||
|
|
$smarty->assign('video', $row);
|
||
|
|
$smarty->assign('thedescription','');
|
||
|
|
|
||
|
|
$smarty->assign('thekeywords','bateworld, men\'s masturbation');
|
||
|
|
|
||
|
|
$smarty->assign('msize', $msize);
|
||
|
|
|
||
|
|
include "footer.php";
|
||
|
|
|
||
|
|
?>
|