"; if($loginaction=="login"){ $oPhoto_Member->data = array("member_id"); $oPhoto_Member->where = "username='$username' and password='$password'"; $result = $oPhoto_Member->getList(); if($myrow=mysql_fetch_row($result)){ echo ""; echo ""; $photomemberid=$myrow[0]; $loginsuccess = "yes"; }else{ $loginsuccess = "no"; } mysql_free_result($result); } if($loginaction=="logout"){ echo ""; echo ""; } echo ""; echo ""; if($oSystem->getValue("photo_randomblock")=="Yes"){ echo ""; } if($oSystem->getValue("photo_latestblock")=="Yes"){ echo ""; } if($oSystem->getValue("photo_memberlogin")=="Yes"){ echo ""; } echo "
".$lang['photogallery']['hbrowsegallery']."

"; echo ""; $galleryfilename = str_replace(dirname($_SERVER["PHP_SELF"])."/", "", $_SERVER["PHP_SELF"]); if($parent_id==""){ $parent_id=0; } $query = "select distinct photo_category.category_id, name, parent_id from photo_category inner join photo_access on (photo_category.category_id=photo_access.category_id and member_id='$cookie_photomemberid') or (showprivate!='Yes') where (parent_id=$parent_id) order by sequence"; $result = mysql_query($query,$oPhoto_Category->db); while($myrow=mysql_fetch_row($result)){ $oPhoto_Category->data = array("parent_id","name"); $oPhoto_Category->where = "parent_id=$myrow[0]"; $resultchild = $oPhoto_Category->getList(); $myrow[1] = stripslashes($myrow[1]); if(mysql_num_rows($resultchild)!=0){ echo ""; }else{ echo ""; } mysql_free_result($resultchild); } mysql_free_result($result); $oPhoto_Category->data = array("parent_id","name"); $oPhoto_Category->where = "category_id=$parent_id"; $oPhoto_Category->order = ""; $result = $oPhoto_Category->getList(); if($myrow=mysql_fetch_row($result)){ echo ""; } mysql_free_result($result); echo "
$myrow[1]
$myrow[1]

".$lang['photogallery']['hbacktop']."


"; echo "
".$lang['photogallery']['hthumbnail']."

"; echo ""; $latestno = $oSystem->getValue("photo_randomno"); $sql = "select photo_id,title,thumbnail,photo from photo_gallery inner join photo_category on (photo_gallery.category_id=photo_category.category_id and showprivate!='Yes') where showphoto='Yes' order by rand() limit 0,$latestno"; $result = mysql_query($sql,$oPhoto_Gallery->db); while($myrow=mysql_fetch_row($result)){ $myrow[1] = stripslashes($myrow[1]); if($myrow[2]!=""){ $thumbnail = ""; }else{ $thumbnail = ""; } if($oSystem->getValue("photo_popup")!="Yes"){ echo ""; }else{ echo ""; } } mysql_free_result($result); echo "
$thumbnail
$myrow[1]

$thumbnail
$myrow[1]

".$lang['photogallery']['hlatest']."

"; echo ""; $latestno = $oSystem->getValue("photo_latestno"); $sql = "select photo_id,title,thumbnail,photo from photo_gallery inner join photo_category on (photo_gallery.category_id=photo_category.category_id and showprivate!='Yes') where showphoto='Yes' order by photo_id desc limit 0,$latestno"; $result = mysql_query($sql,$oPhoto_Gallery->db); while($myrow=mysql_fetch_row($result)){ if($myrow[2]!=""){ $thumbnail = ""; }else{ $thumbnail = ""; } $myrow[1] = stripslashes($myrow[1]); if($oSystem->getValue("photo_popup")!="Yes"){ echo ""; }else{ echo ""; } } mysql_free_result($result); echo "
$thumbnail
$myrow[1]

$thumbnail
$myrow[1]

"; if((($cookie_photomemberid=="" || $cookie_photomemberid=="empty") || $loginaction=="logout") && $loginsuccess!="yes"){ echo "".$lang['photogallery']['hmember']."

"; if($loginsuccess=="no"){ echo "".$lang['photogallery']['hinvalidlogin']."

"; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
".$lang['photogallery']['husername']."
".$lang['photogallery']['hpassword']."
".$lang['photogallery']['hforgetpass']."


"; } if((($cookie_photomemberid!="" && $cookie_photomemberid!="empty") || $loginsuccess=="yes") && $loginaction!="logout"){ echo "".$lang['photogallery']['hyouraccount']."

"; echo ""; echo ""; echo ""; echo "
".$lang['photogallery']['heditinfo']."
".$lang['photogallery']['hlogout']."


"; } echo "
"; ?>
"; if($parent_id==""){ $parent_id=0; } if($oSystem->getValue("photo_submitphoto")=="Yes"){ $submitphoto="".$lang['photogallery']['hsubmityour'].""; } /*****Photo Gallery Thumbnails*****/ if($photo_id=="" && $pageaction!="submitphoto" && $pageaction!="submitphotook" && $pageaction!="editinfo" && $pageaction!="editinfook" && $pageaction!="forgetpass" && $pageaction!="forgetpassok"){ $photo_seq = $oSystem->getValue("photo_seq"); $photo_rowno = $oSystem->getValue("photo_rowno"); $photo_pageno = $oSystem->getValue("photo_pageno"); $oPhoto_Gallery->data = array("distinct photo_id","title","thumbnail","newphoto","photo","photo_gallery.category_id"); if($category_id!="" && $category_id!=0){ $oPhoto_Gallery->where = "photo_gallery.category_id='$category_id' and photo_gallery.category_id=photo_category.category_id and showphoto='Yes'"; }else{ $oPhoto_Gallery->where = "(photo_gallery.category_id=photo_category.category_id) and (photo_category.category_id=photo_access.category_id and member_id='$cookie_photomemberid' or showprivate!='Yes') and showphoto='Yes'"; } $result = $oPhoto_Gallery->getListAccess(); $total = mysql_num_rows($result); if($start=="" || $start==0){ $start=0; } $prev=$start-$photo_pageno; $next=$start+$photo_pageno; $from=$start+1; $to=$photo_pageno+$from-1; if($to>=$total){ $to=$total; }if($to<$from){ $from=0; } /*****Category Tree*****/ $oPhoto_Category->getCategoryLink($category_id); if($CategoryLink==""){ $CategoryLink = "".$lang['photogallery']['htop'].""; }else{ $CategoryLink = "".$lang['photogallery']['htop']." > ".$CategoryLink; } /*****Previous and Next Navigation. Modify To Match Your Display*****/ if($prev>=0){ $prevlink="".$lang['photogallery']['prev'].""; } if($next<$total){ $nextlink="".$lang['photogallery']['next'].""; } if($prevlink!="" && $nextlink!=""){ $navline="  "; } echo "
".$lang['photogallery']['hcategory']." : $CategoryLink$submitphoto

"; echo "
".$lang['photogallery']['showing']." ".$from." - ".$to." ".$lang['photogallery']['of']." ".$total."$prevlink $navline $nextlink
"; echo ""; $oPhoto_Gallery->order = "photo_gallery.sequence $photo_seq limit $start,$photo_pageno"; $result = $oPhoto_Gallery->getListAccess(); if(mysql_num_rows($result)!=0){ while($myrow=mysql_fetch_row($result)){ if($myrow[1]!=""){ $title=stripslashes($myrow[1]); $caption=$myrow[1]; }else{ $title=""; $caption=""; } if($myrow[2]!=""){ $thumbnail="\"$myrow[1]\""; }else{ $thumbnail = "\"".$lang['photogallery']['havailable']."\""; } if($myrow[3]=="Yes"){ $newphoto=""; }else{ $newphoto=""; } /*****Modify The Thumbnail Design Here*****/ if($oSystem->getValue("photo_popup")!="Yes"){ echo ""; }else{ echo ""; } $count++; if($count>$photo_rowno-1){ echo ""; $count=0; } } mysql_free_result($result); }else{echo ""; } echo "
$thumbnail
$title $newphoto
$thumbnail
$title $newphoto


".$lang['photogallery']['hfound']."



"; } /*****View Photo Details*****/ if($photo_id!="" && $pageaction!="submitphoto" && $pageaction!="submitphotook"){ /*****Update Photo Hits*****/ $oPhoto_Gallery->data = array("hit"); $result=$oPhoto_Gallery->getDetail($photo_id); if($myrow=mysql_fetch_row($result)){ $newhit=$myrow[0]+1; } mysql_free_result($result); $oPhoto_Gallery->data=array("hit"); $oPhoto_Gallery->value=array($newhit); $oPhoto_Gallery->update($photo_id); /*****Rate The Photo*****/ if($pageaction=="rate"){ if($oSystem->getValue("photo_limitrating")=="Yes"){ $var = "cookie_photorated$photo_id"; if($$var!="Yes"){ $oPhoto_Gallery->addRating($photo_id,$rating); }else{ $msgrated = "".$lang['photogallery']['halreadyrated'].""; } echo ""; }else{ $oPhoto_Gallery->addRating($photo_id,$rating); } } /*****Comment The Photo*****/ if($pageaction=="comment"){ $oPhoto_Gallery->data = array("comment"); $result=$oPhoto_Gallery->getDetail($photo_id); if($myrow=mysql_fetch_row($result)){ $myrow[0]=addslashes($myrow[0]); $comment=str_replace("\r\n","
",$comment); $newcomment="$comment
-".$lang['photogallery']['hby']." $name

".$myrow[0]; $myrow[0]=stripslashes($myrow[0]); } mysql_free_result($result); $oPhoto_Gallery->data=array("comment"); $oPhoto_Gallery->value=array($newcomment); $oPhoto_Gallery->update($photo_id); } /*****Category Tree*****/ $oPhoto_Category->getCategoryLink($category_id); if($CategoryLink==""){ $CategoryLink = "".$lang['photogallery']['htop'].""; }else{ $CategoryLink = "".$lang['photogallery']['htop']." > ".$CategoryLink; } $photo_seq = $oSystem->getValue("photo_seq"); $oPhoto_Gallery->data=array("photo_id"); $oPhoto_Gallery->data = array("distinct photo_id","title","thumbnail","newphoto","photo","photo_gallery.category_id"); if($category_id!="" && $category_id!=0){ $oPhoto_Gallery->where = "photo_gallery.category_id='$category_id' and photo_gallery.category_id=photo_category.category_id and showphoto='Yes'"; }else{ $oPhoto_Gallery->where = "(photo_gallery.category_id=photo_category.category_id) and (photo_category.category_id=photo_access.category_id and member_id='$cookie_photomemberid' or showprivate!='Yes') and showphoto='Yes'"; } $oPhoto_Gallery->order = "photo_gallery.sequence $photo_seq"; $result=$oPhoto_Gallery->getListAccess(); $count=0; while($myrow=mysql_fetch_row($result)){ if($myrow[0]==$photo_id){ $curpos=$count; } $count++; } $prevpos=$curpos-1; $nextpos=$curpos+1; $curpos=$curpos+1; $total = mysql_num_rows($result); if($prevpos>=0){ mysql_data_seek($result,$prevpos); if($myrow=mysql_fetch_row($result)){ $prev_id=$myrow[0]; }} if($nextpos < $total){ mysql_data_seek($result,$nextpos); if($myrow=mysql_fetch_row($result)){ $next_id=$myrow[0]; }} mysql_free_result($result); /*****Slide Show*****/ if($oSystem->getValue("photo_slideshow")=="Yes"){ if($pageaction=="slideshowplay"){ $slideshow="".$lang['photogallery']['hstopshow'].""; $slideshowtime = $oSystem->getValue("photo_slideshowtime"); echo ""; }else{ $slideshow="".$lang['photogallery']['hslideshow'].""; } }else{ $slideshow=""; } /*****Previous and Next Navigation. Modify To Match Your Display*****/ if($prev_id!=""){ $prevlink="".$lang['photogallery']['prev'].""; } if($next_id!=""){ $nextlink="".$lang['photogallery']['next'].""; } if($prevlink!="" && $nextlink!=""){ $navline="  "; } echo "
Category : $CategoryLink$submitphoto

"; echo ""; echo ""; echo ""; echo "
".$lang['photogallery']['hbackgallery']."".$lang['photogallery']['no']." ".$curpos." ".$lang['photogallery']['of']." ".$total." ".$newphoto."$slideshow$prevlink $navline $nextlink

"; /*****Public Category*****/ $publiccat = array(); $query = "select distinct photo_category.category_id from photo_category inner join photo_access on (photo_category.category_id=photo_access.category_id and member_id='$cookie_photomemberid') or (showprivate!='Yes')"; $result = mysql_query($query,$oPhoto_Category->db); while($myrow=mysql_fetch_row($result)){ array_push($publiccat,$myrow[0]); } mysql_free_result($result); /*****Photo Details. Modify To Match Your Display*****/ $oPhoto_Gallery->data = array("title","publish","descp","descpmore","photo","downloadfile","newphoto","hit","comment","category_id","author"); $result=$oPhoto_Gallery->getDetail($photo_id); if($myrow=mysql_fetch_row($result)){ if(in_array($myrow[9],$publiccat)){ $title=""; $publish=""; $descp=""; $descpmore=""; $photo="\"".$lang['photogallery']['havailable']."\""; $downloadfile=""; $newphoto=""; $hit="".$lang['photogallery']['hhit']." : 0

"; if($myrow[0]!=""){ $title=stripslashes("$myrow[0]

"); }else{$title="";} if($myrow[1]!="0000-00-00"){ $publish="".$lang['photogallery']['publishdate']." : $myrow[1]

"; }else {$publish="";} if($myrow[2]!=""){ $descp=stripslashes("$myrow[2]

"); }else{$descp="";} if($myrow[3]!=""){ $descpmore=stripslashes("
$myrow[3]
"); }else{$descpmore="";} if($myrow[4]!=""){ $photo="\"$myrow[0]\""; } if($myrow[5]!=""){ $downloadfile="[Download File]

"; }else{$downloadfile="";} if($myrow[6]=="Yes"){ $newphoto=" $myrow[7]

"; }else{$hit="".$lang['photogallery']['hhit']." : 0

"; } if($myrow[8]!=""){ $comment=stripslashes($myrow[8]); }else{$comment="";} if($myrow[10]!=""){ $author="".$lang['photogallery']['author']." : $myrow[10]

"; }else {$author="";} if($oSystem->getValue("photo_showrating")=="Yes"){ $thisrate = $oPhoto_Gallery->getRating($photo_id); if($thisrate!=0 || $thisrate!=""){ $rating="".$lang['photogallery']['hrating']." : ".$thisrate." ".$lang['photogallery']['of']." 5

"; }else{ $rating="".$lang['photogallery']['hrating']." : ".$lang['photogallery']['hnotrated']."

"; } }else{ $rating=""; } switch($oSystem->getValue("photo_style")){ /*****Side Details Style*****/ case "1": echo ""; echo ""; echo "
$photo$title $publish $author $hit $rating $downloadfile $descp
$descpmore

"; break; /*****Bottom Details Style*****/ case "2": echo ""; echo ""; echo ""; echo ""; echo "
$photo
$title $downloadfile
$publish$author$hit$rating
$descp $descpmore

"; break; } /*****Rate The Photo*****/ if($oSystem->getValue("photo_showrating")=="Yes"){ echo ""; echo ""; echo ""; echo ""; echo ""; echo "
".$lang['photogallery']['hratethis'].""; echo ""; echo "$msgrated
"; } /*****Visitor Comment*****/ if($oSystem->getValue("photo_showcomment")=="Yes"){ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
".$lang['photogallery']['hvisitorcomm']."
$comment
".$lang['photogallery']['hyourname']." *
".$lang['photogallery']['hyourcomm']." *

"; echo " "; }} } mysql_free_result($result); } if($pageaction=="submitphoto" || $pageaction=="submitphotook"){ if($pageaction=="submitphotook"){ $photoname = strtolower(str_replace(" ","_",trim($_FILES['photo']['name']))); if($photoname!=""){ $oPhoto_Gallery->uploadFile($_FILES['photo']['tmp_name'],$path["docroot"]."_files/photogallery",$photoname); } if($photoname!="" && $oSystem->getValue("photo_gd")!="None"){ $src_file = $path["docroot"]."_files/photogallery/".$photoname; $dest_file = $path["docroot"]."_files/photogallery/"."t_".$photoname; $thumbw = $oSystem->getValue("photo_thumbsize"); $thumbh = $oSystem->getValue("photo_thumbsize"); $oPhoto_Gallery->resizeImage($src_file,$dest_file,$thumbw,$thumbh,85); $thumbnailname = "t_".$photoname; $src_file = $path["docroot"]."_files/photogallery/".$photoname; $dest_file = $path["docroot"]."_files/photogallery/".$photoname; $resizew = $oSystem->getValue("photo_resize"); $resizeh = $oSystem->getValue("photo_resize"); $oPhoto_Gallery->resizeImage($src_file,$dest_file,$resizew,$resizeh,85); } $publish = date("Y-m-d"); $descp = trim(addslashes($descp))." ".$lang['photogallery']['hsubmittedby']." $name"; $sequence = $oPhoto_Gallery->getLastSequence()+1; $oPhoto_Gallery->data = array("photo_id","category_id","title","publish","descp","thumbnail","photo","showphoto","newphoto","sequence"); $oPhoto_Gallery->value = array("",$category_id,$title,$publish,$descp,$thumbnailname,$photoname,"Pending","Yes",$sequence); $oPhoto_Gallery->add(); $message = "
".$lang['photogallery']['hthanksubmit']."

"; } /*****Category Tree*****/ $oPhoto_Category->getCategoryLink($category_id); if($CategoryLink==""){ $CategoryLink = "".$lang['photogallery']['htop'].""; }else{ $CategoryLink = "".$lang['photogallery']['htop']." > ".$CategoryLink; } $CategoryOption=""; $oPhoto_Category->getCategoryOption(0); echo "
".$lang['photogallery']['hcategory']." : $CategoryLink".$lang['photogallery']['hbackgallery']."

"; echo "
$message

"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
".$lang['photogallery']['hsubmittous']."

".$lang['photogallery']['hyourname']." *
".$lang['photogallery']['hemail']." *
".$lang['photogallery']['hcategory']."
".$lang['photogallery']['htitle']." *
".$lang['photogallery']['hdescp']."
".$lang['photogallery']['hphotofile']." *



"; echo " "; } if($pageaction=="editinfo" || $pageaction=="editinfook"){ if($pageaction=="editinfook"){ $oPhoto_Member->data = array("name","email"); $oPhoto_Member->value = array($name,$email); $oPhoto_Member->update($cookie_photomemberid); $status = $lang['photogallery']['haccupdated']."

"; if($oldpass!="" && $newpass!="" && $chkpass!=""){ $oPhoto_Member->data = array("password"); $result = $oPhoto_Member->getDetail($cookie_photomemberid); if($myrow=mysql_fetch_row($result)){ $curpass = $myrow[0]; } mysql_free_result($result); if($oldpass==$curpass && $newpass==$chkpass){ $oPhoto_Member->data = array("password"); $oPhoto_Member->value = array($newpass); $oPhoto_Member->update($cookie_photomemberid); $status = $lang['photogallery']['hpassupdated']."

"; }else{ $status = $lang['photogallery']['hpassnotmatch']."

"; } } } $oPhoto_Member->data = array("name","email","username","password"); $result=$oPhoto_Member->getDetail($cookie_photomemberid); if($myrow=mysql_fetch_row($result)){ $name = $myrow[0]; $email = $myrow[1]; $username = $myrow[2]; } mysql_free_result($result); echo "
".$lang['photogallery']['heditaccount']."
"; echo "

"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
$status
".$lang['photogallery']['hname']."
".$lang['photogallery']['hemail']."
".$lang['photogallery']['husername']."

".$lang['photogallery']['hchangepass']."
".$lang['photogallery']['holdpass']."
".$lang['photogallery']['hnewpass']."
".$lang['photogallery']['hconpass']."


"; } if($pageaction=="forgetpass"){ echo "
".$lang['photogallery']['hforgetpass']."
"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
".$lang['photogallery']['hsearchinfo']."

".$lang['photogallery']['husername']."     ".$lang['photogallery']['hor']."
".$lang['photogallery']['hemail']."


"; } if($pageaction=="forgetpassok"){ $oPhoto_Member->data = array("name","email","username","password"); $oPhoto_Member->where = "username='$username' or email='$email'"; $result = $oPhoto_Member->getList(); if($myrow=mysql_fetch_row($result)){ $emailfrom = $oUser->getAdminEmail(); $subject = $oSystem->getValue("photo_forgetsubject"); $message = $oSystem->getValue("photo_forgetbody"); $message = str_replace("[[name]]",$myrow[0],$message); $message = str_replace("[[username]]",$myrow[2],$message); $message = str_replace("[[password]]",$myrow[3],$message); $oSystem->mail($myrow[1],$subject,$message,$emailfrom); echo "
".$lang['photogallery']['hforgetpass']."
"; echo "
"; echo ""; echo ""; echo "
".$lang['photogallery']['hforgetsend']."

".$lang['photogallery']['hforgetsent']."


".$lang['photogallery']['hforgetback']."


"; }else{ echo "
".$lang['photogallery']['hforgetpass']."
"; echo "
"; echo ""; echo ""; echo "
".$lang['photogallery']['hforgetsorry']."


".$lang['photogallery']['hforgetback']."


"; } } ?>

All content found on this web site is the sole property of Learn Guitars copyright © 2002-2009. All Rights Reserved. Copyright and Intellectual Property Laws are striclty enforced.
For licensing information, permissions or to discuss sposorship or endorsements, please contact Diana Learn.