Jump to content
GIGN Forum

Php Script


JAKuT
 Share

Recommended Posts

kaa lai sitam, php skriptam pievieno klat, vairakas dienas?? lai rada bildes nevis, vienas nedeljas bildes.. bet lai rada 30 dienas... nu 30 focenes ir un 30 dienas radis! nevis tikaj 6 :(

PHP

<?php

$url 

"/img/pics/";

$monImage "$url"."1.jpg";

$tueImage "$url"."2.jpg";

$wedImage "$url"."t3.jpg";

$thurImage "$url"."4.jpg";

$friImage "$url"."5.jpg";

$weekendImage "$url"."6.jpg";

$d date("D");

 

switch (

$d)

{

case 

Mon:

echo 

"<img src=$monImage width=160 height=170>\n";

break;

case 

Tue:

echo 

"<img src=$tueImage width=160 height=170>\n";

break;

case 

Wed:

echo 

"<img src=$wedImage width=160 height=170>\n";

break;

case 

Thu:

echo 

"<img src=$thurImage width=160 height=170>\n";

break;

case 

Fri:

echo 

"<img src=$friImage width=160 height=170>\n";

break;

default:

echo 

"<img src=$weekendImage width=160 height=170>\n";

}

?>

Link to comment
Share on other sites

Šito skriptu var krietni saīsināt.

Nosauc visas bildes no 1-31.jpg

PHP

<?

$url 

"/img/pics/";

$day date("d");

 

echo 

'<img src="'.$url.$day.'.jpg" width=160 height=170>';

}

?>

Link to comment
Share on other sites

Un kaa izdarit.. lai vins ir tada, ramiti!

Man servera monitoru rada, bet sitas bildes nee... :(

rekur monitora, templates..

<!--?BEGIN:?MAIN?-->
<html>
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>
<meta?http-equiv="expires"?content="Fri,?Apr?01?1974?00:00:00?GMT"?/>
<meta?http-equiv="pragma"?content="no-cache"?/>
<meta?http-equiv="refresh"?content="180;url=../monitoring/index.php"?/>
<meta?http-equiv="cache-control"?content="no-cache"?/>
<meta?http-equiv="last-modified"?content="Fri,?04?Mar?2005?22:07:10?GMT"?/>
<style?type="text/css">
<!--
*?{
margin:?0px;
padding:?0px;
}
body?{
font-family:?Verdana,?Tahoma,?Arial,?Helvetica,?sans-serif;
font-size:?9px;
color:?#333;
background:?#FFF;
text-align:?center;?/*?Centers?page?FOR?IE?5,6?*/
}

.image_bg?{
margin-top:?5px;
width:?118px;
height:?84px;
background:?transparent?url('monitor_border.gif')?no-repeat;
}

.image?{
margin:?3px?0?0?1px;
}

.green?{color:?green}
.red?{color:?red}

-->
</style>
</head>
<body>
<!--?BEGIN:?STATUS?-->

<p>
<p?class="image_bg"><img?class="image"?src="/Monitoring/img/maps/{map}.jpg"?width="112"?height="79"?title="{map}"?/></p>
{name}<br?/>
Curent?Map:?{map}<br?/>
Players:<br?/>
<span?class="green">{totalplayers}</span>/<span?class="red">{maxplayers}</span>
</p>
<!--?END:?STATUS?-->
<!--?BEGIN:?TIMEOUT?-->
<p>
<p?class="image_bg"><img?class="image"?src="/Monitoring/img/maps/server_offline.jpg"?width="112"?height="79"?title="server_offline"?/></p>
{name}
</p>


<!--?END:?TIMEOUT?-->
<!--?BEGIN:?DEV?-->
<!--?END:?DEV?-->
</body>
</html>
<!--?END:?MAIN?-->

Link to comment
Share on other sites

nesanak, nezinu vai pat pareizi lieku.. nu es inkluudoju, to photoday!

news.php un

<div class="l_col_wrap">

<div class="l_col_top">Фото дня</div>

<div class="l_col_content">

<?php

include('C:/appserv/www/photoday.php');

?>

</td>

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...