( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
<?php echo "d";
$PicturePath = "photo/";
if (empty($page)){
$page = 0;
}
$record = 20;
if ($Delprofilepicture=="yes") {
$db->delprofilepicture($newsid,$PicturePath);
}
if (!empty($addprofilepicture)) {
$tempuserfile = $_FILES['userfile']['tmp_name'];
$tempuserfile_name = $_FILES['userfile']['name'];
if ((!empty($tempuserfile)) && (!empty($tempuserfile_name))) {
$pathinfo = pathinfo($tempuserfile_name, PATHINFO_EXTENSION);
if(!in_array(strtolower($pathinfo), array('jpg','gif','png')))
{
header('Location: ?mode=profilepicture&msg=Invalid File Type!<br>') ;
exit();
}
$userfile = $tempuserfile;
$userfile_name = $tempuserfile_name;
}
$newsid = $db->addprofilepicture();
if ((!empty($userfile)) && (!empty($userfile_name))) {
$videouser = $_SESSION['user_id'];
$userfile_name = preg_replace('/[\ ]/', '-', $userfile_name);
$userfile_name = $videouser.$userfile_name;
$dest1 = $PicturePath.$userfile_name;
copy($userfile, $dest1);
include("pages/supersize.php");
$saveas="v/uploads/gthumbs/$userfile_name";
$w=70;
$h=70;
$quality="100";
img_resizer($dest1,$quality,$w,$h,$saveas,$nocrop=0,$force=0);
$db->add_profilePicture($newsid,$userfile_name,$PicturePath);
header("Location: indexAlone.php?mode=profilepicture&category=alert-primary&msg=Profile+successfully+picture+Added");
}
}
if (!empty($editprofilepicture)) {
$tempuserfile = $_FILES['userfile']['tmp_name'];
$tempuserfile_name = $_FILES['userfile']['name'];
if ((!empty($tempuserfile)) && (!empty($tempuserfile_name))) {
$pathinfo = pathinfo($tempuserfile_name, PATHINFO_EXTENSION);
if(!in_array(strtolower($pathinfo), array('jpg','png','gif','jpeg')))
{
header('Location: ?mode=profilepicture&msg=Invalid File Type!<br>') ;
exit();
}
$userfile = $tempuserfile;
$userfile_name = $tempuserfile_name;
}
if ((!empty($userfile)) && (!empty($userfile_name))) {
$videouser = $_SESSION['user_id'];
$userfile_name = preg_replace('/[\ ]/', '-', $userfile_name);
$userfile_name = $videouser.$userfile_name;
$dest1 = $PicturePath.$userfile_name;
copy($userfile, $dest1);
$db->add_profilePicture($newsid,$userfile_name,$PicturePath);
}
$db->editprofilepicture($catalogid,$title,$description,$isdisplay,$newsid);
header("Location: indexAlone.php?mode=profilepicture&category=alert-primary&msg=Profile+successfully+picture+updated");
}
if (!empty($DP1)) {
$db->del_profilePicture($newsid,$PicturePath);
}
echo "dd";
$picme2 = $db->getallprofilepictures($page,$record);
?>
qqqqqqqq
<h2 style="margin-top:0px" class="post-title" id="status">Profile Picture</h2>
<?php
if (!empty($picme2)) {
while ( list($key,$val)=each($picme2) ) {
$newsidme = stripslashes($val["id"]);
$title = stripslashes($val["title"]);
$picture = stripslashes($val["picture"]);
?>
<table width="100%" height="76" border="0" cellpadding="0" cellspacing="0" id="Table_01" >
<tr>
<td height="76" style="padding:5px">
<table width="100%" cellspacing="0" cellpadding="0">
<tr >
<td width="64" valign="middle">
<img src="<?php echo $siteaddress;?>taswira.php?width=100&height=100&cropratio=1:1&image=/v/uploads/gthumbs/<?php print "$picture"; ?>" alt="edit thumb" title="Published: <?php echo $adddate ?>" width="100" height="100" style=" margin-left:2px;-moz-border-radius : 3px 3px 3px 3px:-webkit-border-radius : 3px 3px 3px 3px;border-radius : 3px 3px 3px 3px;"/></td>
<td width="100%" valign="middle"><div align="left" style=" padding-left:10px; color:#FFF; font-size:14px" title="Published: <?php echo $adddate ?>" ><?php print text_limit($title,8); ?></div></td>
<!-- <td width="54" valign="middle" >
<?php
switch($isdisplay){
case "3":
?>
<img src="images/distributed.png" width="40" alt="Pending Distribution" />
<?php
break;
case "2":
?>
<img src="images/distributionpending.png" width="40" alt="New Distribution Added But Pending" />
<?php
break;
case "1":
?>
<img src="images/distribute.png" width="40" alt="Distributed"/>
<?php
break;
case "0":
?>
<img src="no.png" alt="not featured" />
<?php
break;
}
?>
</td> -->
<td width="40" valign="middle" > </td>
<td width="30">
<a href="?mode=profilepicture&newsid=<?php print "$newsidme"; ?>&catid=<?php print "$catid"; ?>&Delprofilepicture=yes" class="en_b style6 style6"><img src="images/declined.png" width="30" hspace="10" alt="delete" /></a></td>
</tr></table>
</td>
</tr></table>
<?php
}
}
?>
<?php
$picme2 = $db->getpicturecount($page,$record);
if (!empty($picme2)) {
while ( list($key,$val)=each($picme2) ) {
$mycount = stripslashes($val["mycount"]);
if ($mycount < 1) {?>
<form action="?mode=profilepicture" method="POST" ENCTYPE="multipart/form-data">
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<td >
<div class="input-group input-group-lg m-t-lg" id="one">
<input name="userfile" type="file" class="form-control input-lg no-border text-sm"><input name="catalogid" type="hidden" class="bigsearch" value="<? echo $_SESSION['user_id'];?>"> </div>
</td>
<td ><span class="input-group input-group-lg m-t-lg" style=" max-width:260px;">
<input name="addprofilepicture" type="submit" class= "pull-right btn-lg no-borders bg-warning dk" value="Upload Photo" />
</span></td> <?php /*?><td ><span class="input-group input-group-lg m-t-lg" style=" max-width:260px;">
<a href="<?php echo $siteaddress; ?>indexAlone.php?mode=webcam" class= "pull-right btn-lg no-borders bg-black dk"> <i class="icon-camera"></i>Webcam</a>
</span></td><?php */?>
</tr>
</table>
</p>
</form>
<? } ?>
<?php
}
}
?>