Commit 995007d1 authored by Seblu's avatar Seblu
Browse files

merging public directory and include

fix some photos persistent links and sql request
cleaning mysql db (this is not seen in svn commit)
number of last videos displayed is now 20
limit to 10 number of news on home page
create a dedicated page for actu (section News)
starting work about fan page (create fan menu button)
remove old rss api in videos page
some pagination work (delete trailing and better indent)
fix dead link to eptv.epitech.net in mysql database
fix css bad margin in newsbox
parent 24481841
Loading
Loading
Loading
Loading
+15 −8
Original line number Diff line number Diff line
@@ -11,14 +11,14 @@ body
	font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif;
}
* {
	margin: 0;
	padding: 0;
	margin: 0px;
	padding: 0px;
	font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif;
}
ul, li {
	list-style-type: none;
	padding: 0;
	margin: 0;
	padding: 0px;
	margin: 0px;
}
li {
	display: inline;
@@ -104,7 +104,7 @@ div.top_box
	position: absolute;
	height: 22px;
	/*width: 334px;*/
	left: 270px;
	left: 200px;
	top: 101px;
}
#menu li {
@@ -169,8 +169,8 @@ div.top_box
*/

div#newsbox {
	width: 530px;
	margin: 0px 0px 20px 15px;
	/*width: 530px;*/
	margin: 0px 15px 20px 15px;
}

div#newsbox ul {
@@ -231,6 +231,13 @@ div.rightbox h1 {
	border-bottom: 1px solid #303030;
}

#all_side {
	float: left;
	padding: 0px;
	margin: 0px;
	background: #303030;
}

#left_side {
	float: left;
	width: 550px;
+0 −0

File moved.

+0 −0

File moved.

+0 −0

File moved.

+32 −97
Original line number Diff line number Diff line
@@ -2,8 +2,6 @@

function dispHome(){

//echo 'test'.$_SESSION["WEEZ"]." CRYPTAGE MD5 : ".md5($_SESSION["WEEZ"]) ;

$str	= '

    <div id="main_body">
@@ -13,7 +11,7 @@ $str = '
    <!-- main body -->
    	<div id="left_side">
            <div id="newsbox">
                <h1><img alt="" src="images/puce.png" /> <strong>Br&egrave;ves</strong></h1>
                <h1><img alt="" src="images/puce.png" /> <strong>Derni&egrave;res actualit&eacute;s</strong></h1>
                <ul>';

	$str .=dispHomeNews();
@@ -37,14 +35,6 @@ $str = '

	$str .= dispHomeLastVideos();

	$str .='
            </div>
			<div class="rightbox">
                <h1><img alt="" src="images/puce.png" /> <strong>Derni&egrave;res photos</strong></h1>
               ';
						
	$str .= dispHomeLastPhotos();

	$str .='
            </div>
        </div>
@@ -64,19 +54,15 @@ function dispHomeNews(){

  $str = '';

	if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] ) {	
  if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"])
    $result = getLastNews(2);
	}
	else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"] ) {	
  else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"])
    $result = getLastNews(1);
	}
	else {
  else
    $result = getLastNews(0);
	}

  if (mysql_num_rows($result)) {
		while ($news = mysql_fetch_array($result)) {

    for ($cpt = 0; $cpt < 10 && ($news = mysql_fetch_array($result)); $cpt++) {

      // DISP NEWS TITLE BY TENDU
      $str .= dispWhenTendu($news["news_tendu"]);
@@ -89,8 +75,6 @@ function dispHomeNews(){

      // DISP NEWS CONTENT BY TENDU
      $str .= dispWhenTendu($news["news_tendu"]);


      $str .= '
				<span class="news_date"> - '.$news["news_date"].'</span></h2>
                        <p class="news_text">'.$news["news_comment"].'</p>
@@ -98,7 +82,6 @@ function dispHomeNews(){
                    </li>';
    }
  }

  return ($str);
}

@@ -135,8 +118,7 @@ function dispHomeLastVideos(){


	if (mysql_num_rows($result)){
		for ($cpt = 0; $cpt < 10 && ($video = mysql_fetch_array($result)); $cpt++) {
			
		for ($cpt = 0; $cpt < 20 && ($video = mysql_fetch_array($result)); $cpt++) {

// DISP LAST VIDEOS BY TENDU
			$str .= dispWhenTendu($video["video_tendu"]);
@@ -163,51 +145,4 @@ function dispHomeLastVideos(){
	return ($str);
}

function dispHomeLastPhotos(){


	if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] ) {	
		$result = getLastPhotosByTendu(2);
	}
	else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"] ) {	
		$result = getLastPhotosByTendu(1);
	}
	else {
		$result = getLastPhotosByTendu(0);
	}

	$str = '<ul>';


	if (mysql_num_rows($result)){
		for ($cpt = 0; $cpt < 10 && ($photo = mysql_fetch_array($result)); $cpt++) {
			

// DISP LAST PHOTOS BY TENDU
			$str .= dispWhenTendu($photo["photo_tendu"]);

			$str .= '<li><a href="index.php?section=PhotosShow&action='.$photo["photo_path"].'" class="texte_link"';
			
			if ($photo["photo_comment"]) {
			$str .= 'ONMOUSECLICK="popitup(\'<font>'.$photo["photo_comment"].'</font>\', \'#d3d3df\')"';
		}
			$str .= '>'.$photo["photo_name"].'</a>&nbsp;';
				if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] && photo_img_path != 0) {
                        	$str .= '<a href="http://www.eptv.fr/"'.$photo["photo_img_path"].'" class="texte_link" >(zip)</a>';
                        	}
			$str .= '';
			$str .=	'&nbsp;&nbsp;&nbsp;<strong>'.$photo["photo_size"]. ' Img</strong>
				</li>
			';
		}
			$str .= '</ul>';
	}

	$str .= '
		</small>
	';

	return ($str);
}

?>
Loading