Mitteilung der Personalabteilung
Letzter Beitrag: [49op]_sauberman
Forum: Der Clan teilt mit
27.03.2015 - 12:51

 

keine aktive Umfrage

zeige Umfragen
read_module('videos'); if(isnewsadmin($userID)) echo'
'; /********************** CONFIG-BEREICH **********************/ $sets=safe_query("SELECT * FROM ".PREFIX."videos_settings"); $set=mysql_fetch_array($sets); $max=$set['max']; /* Anzahl der Videos pro Seite */ $sortierung = $set[sort]; /* Art der Sortierung ( Mögliche Variationen: hits und vidID ) */ $HD = $set['hd']; /* Ob Youtube Videos in HD abgespielt werden sollen */ /********************** KATEGORIEN AUSGABE **********************/ $videosrubrics=safe_query("SELECT rubricID, rubric FROM ".PREFIX."videos_rubrics ORDER BY rubric"); while($dr=mysql_fetch_array($videosrubrics)) { $rubrics.=''; } /********************** ACTION VARIABLEN **********************/ if(!isset($_GET['action'])) { $page = $_GET['page']; $sort = $_GET['sort']; $type = $_GET['type']; $rubric = $_GET['rubric']; if(!isset($rubric)){ $alle=safe_query("SELECT vidID FROM ".PREFIX."videos"); $gesamt = mysql_num_rows($alle); $pages=1; if(!isset($page)) $page = 1; if(!isset($sort)) $sort = "$sortierung"; if(!isset($type)) $type = "DESC"; for ($n=$max; $n<=$gesamt; $n+=$max) { if($gesamt>$n) $pages++; } }else{ $aller=safe_query("SELECT vidID FROM ".PREFIX."videos WHERE rubric=".$rubric.""); $gesamt = mysql_num_rows($aller); $pages=1; if(!isset($page)) $page = 1; if(!isset($sort)) $sort = "$sortierung"; if(!isset($type)) $type = "DESC"; for ($n=$max; $n<=$gesamt; $n+=$max) { if($gesamt>$n) $pages++; } } /********************** SEITENANZAHL GENERIEREN BEI MEHR ALS EINER SEITE + SORTIERUNG **********************/ if($pages>1){ if(isset($rubric)){ $page_link = makepagelink("index.php?site=videos&sort=$sort&type=$type&rubric=$rubric", $page, $pages); }else{ $page_link = makepagelink("index.php?site=videos&sort=$sort&type=$type", $page, $pages); } } if ($page == "1") { $ergebnis = safe_query("SELECT * FROM ".PREFIX."videos ORDER BY $sort $type LIMIT 0,$max"); if(isset($rubric)) $ergebnis = safe_query("SELECT * FROM ".PREFIX."videos WHERE rubric=".$rubric." ORDER BY $sort $type LIMIT 0,$max"); if($type=="DESC") $n=$gesamt; else $n=1; } else { $start=$page*$max-$max; $ergebnis = safe_query("SELECT * FROM ".PREFIX."videos ORDER BY $sort $type LIMIT $start,$max"); if(isset($rubric)) $ergebnis = safe_query("SELECT * FROM ".PREFIX."videos WHERE rubric=".$rubric." ORDER BY $sort $type LIMIT $start,$max"); if($type=="DESC") $n = ($gesamt)-$page*$max+$max; else $n = ($gesamt+1)-$page*$max+$max; } if($gesamt) { if($type=="ASC"){ if(isset($rubric)){ echo'Sort:    '; }else{ echo'Sort:    '; } }else{ if(isset($rubric)){ echo'Sort:    '; }else{ echo'Sort:    '; } } /********************** TITLE VOM VIDEOS-BEREICH **********************/ $cat = $_language->module['category']; echo '

VIDEOS

'; echo '
'.$cat.':'; echo ''.$rubrics.'
'; /********************** HAFTUNGSAUSSCHLUSS **********************/ $haft=$_language->module['haft']; echo('
'.$haft.'
'); /********************** BEI MEHR ALS EINER SEITE AUSGABE DER SEITENZAHLEN **********************/ if($pages>1) echo $page_link; $i=1; while($ar=mysql_fetch_array($ergebnis)) { if($i%2) { $bg1=BG_1; $bg2=BG_2; } else { $bg1=BG_3; $bg2=BG_4; } $com=getanzcomments($ar[vidID],"mo"); /********************** INHALT VOM VIDEOS-BEREICH **********************/ $cat = $_language->module['category']; $len = $_language->module['length']; $comm = $_language->module['comments']; $vis = $_language->module['visit']; $cli=$_language->module['clicks']; $mins=$_language->module['mins']; $prevt=$_language->module['preview']; echo ' '; eval ("\$content = \"".gettemplate("videos_liste")."\";"); echo $content; $i++; } } else{ echo'
'.$_language->module['no_entrys'].''; } /********************** BEI MEHR ALS EINER SEITE AUSGABE DER SEITENZAHLEN **********************/ echo $page_link; /********************** ACTION DETAIL **********************/ } elseif($_GET['action'] == "detail") { $id=$_GET['id']; $portal = $_GET['portal']; if(isset($id)){ $res=safe_query("SELECT * FROM ".PREFIX."videos WHERE vidID=$id"); if(mysql_num_rows($res)){ $ar=mysql_fetch_array($res); safe_query("UPDATE ".PREFIX."videos SET hits=hits+1 WHERE vidID=$id"); $bg1=BG_1; $bg2=BG_2; /********************** WENN DER BENUTZER FILE-ADMIN RECHTE HAT, AUSGABE DER BUTTONS FÜR DIE ADMINISTRIERUNG **********************/ if(isfileadmin($userID)) $adm=''; /********************** VIDEOBERSCHREIBUNG AUSGABE **********************/ if($ar[viddescription]) $des=$ar[viddescription]; else $des=''.$_language->module['no_desc'].''; $cat = $_language->module['category']; $len = $_language->module['length']; $comm = $_language->module['comments']; $bac = $_language->module['back']; $cli=$_language->module['clicks']; $mins=$_language->module['mins']; $dess=$_language->module['description']; $port=safe_query("SELECT * FROM ".PREFIX."videos_portals WHERE id=$portal"); $pr=mysql_fetch_array($port); $embcode = $pr['embed']; echo '

VIDEOS

'.$ar[vidheadline].'
'; $port=safe_query("SELECT * FROM ".PREFIX."videos_portals WHERE id=$ar[portal]"); $pr=mysql_fetch_array($port); $prevcode = $pr['preview']; echo ''.$prevt.'
'.$ar[vidheadline].'
'; if($portal == 1 && $HD == 1){ echo ''; } else{ eval ($embcode); } eval ("\$details = \"".gettemplate("videos_watch")."\";"); echo $details; unset($comments); unset($ds); unset($page); unset($pages); $parentID = $id; $type = "mo"; $referer = "index.php?site=videos&action=detail&id=$id&portal=$portal"; $comments_allowed = "2"; //include("comments.php"); } /********************** FEHLERMELDUNG BEI FALSCHER ID EINGABE **********************/ else echo'
'.$_language->module['no_id'].' '.$id.' '.$_language->module['avail'].'
'; } else echo''.$_language->module['err_entry'].'!'; } /********************** ACTION ADD **********************/ elseif($_GET['action'] == "add") { if(!isnewsadmin($userID)) die('
'.$_language->module['no_perm'].'
'); $bg1=BG_1; $bg2=BG_2; $head = $_language->module['add_vid']; $leng = $_language->module['length']; $cat = $_language->module['category']; $desc = $_language->module['description']; $rubriken = ''; $rubrics=safe_query("SELECT * FROM ".PREFIX."videos_rubrics ORDER BY rubric"); while($dr=mysql_fetch_array($rubrics)) { $rubriken .= ''; } $portals=safe_query("SELECT * FROM ".PREFIX."videos_portals ORDER BY id"); while($dr=mysql_fetch_array($portals)) { $ports .= ''; } eval ("\$add = \"".gettemplate("videos_add")."\";"); echo $add; } /********************** ACTION EDIT **********************/ elseif($_GET['action'] == "edit") { if(!isnewsadmin($userID)) die('
'.$_language->module['no_perm'].'
'); $bg1=BG_1; $bg2=BG_2; $id=$_GET['id']; $leng = $_language->module['length']; $cat = $_language->module['category']; $desc = $_language->module['description']; $prev = $_language->module['preview']; $get=safe_query("SELECT * FROM ".PREFIX."videos WHERE vidID=$id"); if(mysql_num_rows($get)){ $ds=mysql_fetch_array($get); $rubriken = ''; $rubrics=safe_query("SELECT * FROM ".PREFIX."videos_rubrics ORDER BY rubric"); while($dr=mysql_fetch_array($rubrics)) { if($ds[rubric]==$dr[rubricID]){ $rubriken .= ''; }else{ $rubriken .= ''; } } $portals=safe_query("SELECT * FROM ".PREFIX."videos_portals ORDER BY id"); while($dr=mysql_fetch_array($portals)) { if($ds[portal]==$dr[id]){ $ports .= ''; }else{ $ports .= ''; } } eval ("\$edit = \"".gettemplate("videos_edit")."\";"); echo $edit; } /********************** FEHLERMELDUNG BEI FALSCHER ID **********************/ else echo'
'.$_language->module['no_id'].' '.$id.' '.$_language->module['avail'].'
'; } /********************** ACTION SAVE **********************/ elseif($_GET['action'] == "save") { if(!isnewsadmin($userID)) die('
'.$_language->module['no_perm'].'
'); $name=$_POST['name']; $rubric = $_POST['rubric']; $portal = $_POST['portal']; $length=$_POST['length']; $source=$_POST['source']; $desc=nl2br($_POST['description']); $clip=$_POST['clip']; if(isset($_POST['save'])){ $safe=safe_query("INSERT INTO ".PREFIX."videos (rubric, vidheadline, vidlength, vidsource, viddescription, vidclip, portal) VALUES ('".$rubric."', '".$name."', '".$length."', '".$source."', '".$desc."', '".$clip."', '".$portal."')"); }else{ echo'
'.$_language->module['err_entry'].'
'; } if($safe)echo'
'.$_language->module['suc_entry'].'
'; else echo'
'.$_language->module['err_entry'].'
'; } /********************** ACTION SAVE EDIT **********************/ elseif($_GET['action'] == "saveedit"){ if(!isnewsadmin($userID)) die('
'.$_language->module['no_perm'].'
'); $name=$_POST['name']; $rubric = $_POST['rubric']; $portal = $_POST['portal']; $length=$_POST['length']; $source=$_POST['source']; $desc=nl2br($_POST['description']); $clip=$_POST['clip']; $id=$_POST['id']; $safe=safe_query("UPDATE ".PREFIX."videos SET rubric='$rubric', vidheadline='$name', vidlength='$length', vidsource='$source', vidclip='$clip', viddescription='$desc', portal='$portal' WHERE vidID=$id"); $preview=$_FILES['preview']; $prename = $preview['name']; if(!empty($prename)) { $safe2=safe_query("UPDATE ".PREFIX."videos SET vidpreview='$prename' WHERE vidID=$id"); /********************** WENN ALLES STIMMT, DANN ERFOLGREICH. WENN NICHT, DANN FEHLERMELDUNG **********************/ if($upload && $safe2)echo'
'.$_language->module['suc_prev'].'
'; else echo'
'.$_language->module['err_prev'].'
'; } /********************** AUFFORDERUNG ES ERNEUT ZU VERSUCHEN + AUTOMATISCHES ZURÜCKGEHEN AUF DIE VIDEOS SEITE **********************/ if($safe)echo'
'.$_language->module['suc_edit'].'
'; else echo'
'.$_language->module['err_entry'].'
'; } /********************** SHOW **********************/ elseif($_GET['show']) { $result=safe_query("SELECT rubricID FROM ".PREFIX."videos_rubrics WHERE rubric='".$_GET['show']."' LIMIT 0,1"); $dv=mysql_fetch_array($result); $showonly = "AND rubric='".$dv[rubricID]."'"; } /********************** ACTION DELETE **********************/ elseif($_GET['action'] == "delete") { if(!isnewsadmin($userID)) die('
'.$_language->module['no_perm'].'
'); $id=$_GET['id']; safe_query("DELETE FROM ".PREFIX."videos WHERE vidID=$id"); echo'
'.$_language->module['suc_delete'].'
'; } echo (''); ?>
QLOC
Sicherheitscode

Heute
87
Gestern
851
Monat
17580
Insgesamt
1140787
Online
28