Index Découvrir l'asso Forum Les blogs Photos documentation A lire TEST

Menu utilisateur

Index arrow Photos arrow Mieux évaluées
Galerie
Les plus vues | Mieux évaluées | Dernières ajoutées | Dernières commentées
10 images les mieux évaluées
DatsoGallery Multilingual
By Andrey Datso
setQuery("select count(*) from #__datsogallery where owner='$my->username' order by ordering desc"); $count = $database->loadResult(); require_once("includes/pageNavigation.php"); $pageNav = new mosPageNav( $count, $limitstart, $limit ); $mainframe->setPageTitle(_DG_USER_PANEL); $mainframe->AppendPathway(_DG_USER_PANEL); echo '

'; echo "

\n"; echo "\n"; echo "\n"; echo "\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($ad_approve) { echo "\n"; } echo "\n"; $database->setQuery( "select * from #__datsogallery where owner='$my->username' limit $limitstart, $limit" ); $rows = $database->loadObjectList(); $k = 0; if (count($rows)) { foreach ($rows as $row) { $k = 1 - $k; $kp = $k + 1; $imgprev = $mosConfig_live_site.$ad_paththumbs."/$row->imgthumbname"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($ad_approve) { if ($row->approved) { $a_pic = "tick.png"; } else { $a_pic = "publish_x.png"; } echo "\n"; } echo "\n"; } } else { echo ""; echo "\n"; echo "\n"; echo "\n"; } echo "
\n"; echo ""; echo "
"._DG_PIC_NAME.""._DG_HITS.""._DG_CATEGORY.""._DG_ACTION."\n"._DG_APPROWED."
\nimgtitle."', '".$imgprev."')\" onmouseout=\"return nd();\">".$row->imgtitle."\n".$row->imgcounter."\n".ShowCategoryPath($row->catid).""; echo ""; echo ""; echo ""; echo ""; echo "\n"; echo "
"; echo "
"; echo "
"._DG_NOT_HAVE_PIC."
\n"; echo "
"; echo "
"; echo $pageNav->writePagesLinks("$dgurl&func=userpannel"); echo "
"; echo $pageNav->writePagesCounter(); echo "
"; echo $pageNav->writeLimitBox ("$dgurl&func=userpannel"); echo "
"; } function savePic ($option) { global $database, $ad_approve, $dgurl, $my, $is_editor; $row = new mosdatsogallery($database); if (!$row->bind($_POST, "approved owner published orgimagename imgfilename imgthumbname")) { echo "\n"; exit(); } $row->imgdate = mktime(); $row->owner = $my->username; $row->published = 1; if ($ad_approve) { $row->approved = 0; } else { $row->approved = 1; } if ($row->owner == $is_editor){ $row->approved = 1; } if (!$row->store()) { echo "\n"; exit(); } mosRedirect(sefRelToAbs("$dgurl&func=userpannel"), _DG_UIC_SUCCESS_IPDATED); } function deletePic ($uid, $option) { global $database, $my, $mosConfig_absolute_path, $ad_pathoriginals, $ad_pathimages, $ad_paththumbs, $dgurl; $database->setQuery("select owner from #__datsogallery where id=" . intval($uid)); $own = $database->loadResult(); if ($own !== $my->username) { mosRedirect(sefRelToAbs("$dgurl&func=userpannel"), _DG_NOT_ALOWED_DELETE_PIC); die(); } if ($uid) { $row = new mosdatsogallery($database); $row->load($uid); if (unlink($mosConfig_absolute_path . $ad_pathoriginals . "/$row->imgoriginalname")) if (unlink($mosConfig_absolute_path . $ad_pathimages . "/$row->imgfilename")) if (unlink($mosConfig_absolute_path . $ad_paththumbs . "/$row->imgthumbname")) { $database->setQuery("delete from #__datsogallery_comments where cmtpic=$uid"); if (!$database->query()) { echo "\n"; } $database->setQuery("delete from #__datsogallery where id=$uid"); if (!$database->query()) { echo "\n"; } } else { die(_DG_NOT_DELETE_THMB_IMAGE_FILE); } } else { die(_DG_FFFFFFF); } mosRedirect(sefRelToAbs("$dgurl&func=userpannel"), _DG_PIC_COMMENT_DELETED); } function ShowDropDownCategoryList ($cat, $cname = "cat", $extra = null, $flag = 0) { global $database, $ad_category, $gid, $dgurl; $arr_cat = explode(",", $ad_category); $category = ""; return $category; } function dgCategories($catid, $Itemid){ global $database, $my, $gid, $dgurl, $ad_imgstyle, $ad_ncsc, $thumbnailpath, $gallerypath, $ad_thumbwidth, $ad_thumbheight; $database->setQuery(" select d.* " . " from #__datsogallery_catg as d " . " where d.parent=$catid and d.published='1' and access<='".$my->gid."' " . " order by d.ordering desc "); $rows = $database->loadObjectList(); $num_rows = count($rows); $index = 0; if ($num_rows == 0){ $output = ''; } else if ($ad_ncsc > $num_rows){ $ad_ncsc = $num_rows; } else { $ad_ncsc = $ad_ncsc; } if($ad_ncsc == '1'){$cw = '100%'; } else if ($ad_ncsc == '2') { $cw = '50%'; } else if ($ad_ncsc == '3') { $cw = '34%'; } else if ($ad_ncsc == '4') { $cw = '25%'; } else if ($ad_ncsc == '5') { $cw = '20%';} $colspan = $ad_ncsc*2; $output = '
'; if (!$num_rows) { $output .= ''; } else if ($rows[0]->parent) { $output .= ''; } else { $output .= ''; } for ( $row_count = 0; $row_count < ( $num_rows/$ad_ncsc ); $row_count++ ) { $output .= ''; for ($i = 0; $i < $ad_ncsc; $i++) { $cur_name = @$rows[$index]; $output .= ''; } else { $catid = $cur_name->cid; $database->setQuery(" select *, c.access from #__datsogallery as p " ." left join #__datsogallery_catg as c on c.cid=p.catid " ." where " . ( $catid ? " ( p.catid in (". $catid .") )" : '' ) ." and p.published = '1' and p.approved='1' and c.access<='".$my->gid."' " . ( $catid ? " or ( c.parent in (". $catid .") )" : '' ) ." and p.published = '1' and p.approved='1' and c.access<='".$my->gid."' " ." order by id desc limit 1 "); $rows2 = $database->loadObjectList(); $count = $database->loadResult(); $row2 = &$rows2[0]; if ($count > 0) { $output .= ''; $output .= ''; $output .= ''; $index++; } $output .= ''; } $output .= '
'._DG_SUBCATEGORIES.'
'._DG_CATEGORIES.'
'; $output .= 'cid") . '">'; if (!$cur_name->cid){ $output .= ' '; } else { $output .= '';} } if ($cur_name) { $output .= 'cid") . '">'; $output .= $cur_name->name . '
'; $output .= '(' . GetNumberOfLinks($cur_name->cid) . ' '._DG_PICTURES.')'; } else { $output .= ' '; } $output .= '
' . @$cur_name->description . '
'; return $output; } function ShowCategoryPathLink ($cat) { global $database, $mainframe, $mosConfig_absolute_path, $mosConfig_live_site, $gid, $dgurl, $gallerypath, $ad_pathway; $home = " ". _DG_HOME.""; $arrow = 'templates/' . $mainframe->getTemplate() . '/images/arrow.png'; if (file_exists( "$mosConfig_absolute_path/$arrow" )) { $picarrow = ''; } else { $arrow = '/images/M_images/arrow.png'; if (file_exists( $mosConfig_absolute_path . $arrow )) { $picarrow = ''; } else { $picarrow = '»'; } } $cat = intval($cat); $parent = 1000; while ($parent) { $database->setQuery(" select * from #__datsogallery_catg where cid=$cat and published=1 and access<='".$gid."' "); $rows = $database->loadObjectList(); $row = &$rows[0]; $name = $row->name; $parent = $row->parent; $cid = $row->cid; $name = "".$name.""; if (empty($path)) { $path = $name; } else { $path = $name . $picarrow . $path; } $cat = $parent; } if(!$ad_pathway){ $pathName = $home . $picarrow . $path; }else{ $pathName = $mainframe->AppendPathway($path); } return $pathName; } function GetNumberOfLinks ($cat){ global $database, $gid, $dgurl; $queue[] = intval($cat); while (list($key, $cat) = each($queue)) { $database->setQuery("select cid from #__datsogallery_catg where parent=$cat and published=1"); $result = $database->query(); $total = mysql_num_rows($result); $j = 0; while ($j < $total) { $val = mysql_fetch_row($result); $queue[] = $val[0]; $j++; } } reset($queue); $query = "select count(*) from #__datsogallery where ( 0!=0"; while (list($key, $cat) = each($queue)) { $query .= " or catid = $cat"; } $query = $query . " ) and published=1 and approved = 1"; $database->setQuery($query); $result = $database->query(); $val = mysql_fetch_row($result); return $val[0]; } function ShowCategoryPath ($cat){ global $database, $mosConfig_lang, $gid, $dgurl; $cat = intval($cat); $parent = 1000; while ($parent) { $database->setQuery( "select * from #__datsogallery_catg where cid=$cat and access<='".$gid."' "); $rows = $database->loadObjectList(); $row = &$rows[0]; $parent = $row->parent; $name = $row->name; if (empty($path)) { $path = $name; } else { $path = $name . ' » ' . $path; } $cat = $parent; } return $path . " "; } ?>
home contact search contact search