script

eushacker 1456132452316 Webmasterren gunea | 2006-11-27 20:55
4

Euskarara itzulitako aplikazioak edo kodea baduzu sar hemen eta publikatuko dugu.

miel

miel 2006-11-27 21:02 #1

<p>Egutegia euskaraz:<br /><br />&lt;table&gt;<br />&nbsp;&lt;?PHP <br />$fontfamily = isset($fontfamily) ? $fontfamily : "Tahoma, Geneva, sans-serif"; <br />$defaultfontcolor = isset($defaultfontcolor) ? $defaultfontcolor : "#00000000"; <br />$defaultbgcolor = isset($defaultbgcolor) ? $defaultbgcolor : "#FFFFFF"; <br />$todayfontcolor = isset($todayfontcolor) ? $todayfontcolor : "#FFFFFF"; <br />$todaybgcolor = isset($todaybgcolor) ? $todaybgcolor : "#CC0000"; <br />$monthcolor = isset($monthcolor) ? $monthcolor : "#333399"; </p>

<p>$relfontsize = isset($relfontsize) ? $relfontsize : "1"; <br />$cssfontsize = isset($cssfontsize) ? $cssfontsize : "8pt"; </p>

<p>$month = (isset($month)) ? $month : date("n",time()); <br />$monthnames = array("Urtarrila", "Otsaila", "Martxoa", "Apirila", "Maiatza", "Ekaina", "Uztaila", "Abuztua", "Iraila", "Urria", "Azaroa", "Abendua"); <br />$textmonth = $monthnames[$month - 1]; <br />$year = (isset($year)) ? $year : date("Y",time()); <br />$today = (isset($today))? $today : date("j", time()); ## Make $today really big to avoid hilite <br />$today = ($month == date("n",time())) ? $today : 32; <br />if ( (($month &lt; 8) &amp;&amp; ($month % 2 == 1)) || (($month &gt; 7) &amp;&amp; ($month % 2 == 0)) ) <br />$days = 31; <br />if ( (($month &lt; 8) &amp;&amp; ($month % 2 == 0)) || (($month &gt; 7) &amp;&amp; ($month % 2 == 1)) ) <br />$days = 30; <br />if ($month == 2) <br />$days = (date("L",time())) ? 29 : 28; </p>

<p>$dayone = date("w",mktime(1,1,1,$month,1,$year)); <br />$daylast = date("w",mktime(1,1,1,$month,$days,$year)); <br />?&gt; <br />&lt;table width="49%" border="1" align="center" cellpadding="0" cellspacing="0" &gt; <br />&lt;tr&gt; <br />&lt;td bgcolor="#FFCC00" colspan="7" valign="middle" align="center"&gt;&lt;font color="&lt;?php echo $monthcolor ?&gt;" face="Arial, Helvetica, sans-serif" size="3"&gt;&lt;b&gt;&lt;?PHP echo $textmonth ?&gt;&lt;/b&gt;&lt;/font&gt;&lt;/td&gt; <br />&lt;/tr&gt; <br />&lt;tr&gt; <br />&lt;td width="7%" align="center" valign="middle" bgcolor="#FFFFFF"&gt;&lt;span class="Estilo1"&gt;&lt;font face="&lt;?PHP echo $fontfamily ?&gt;" size="1"&gt;Ig&lt;/font&gt;&lt;/span&gt;&lt;/td&gt; <br />&lt;td bgcolor="&lt;?PHP echo $defaultbgcolor ?&gt;" valign="middle" align="center" width="7%"&gt;&lt;font face="&lt;?PHP echo $fontfamily ?&gt;" size="1"&gt;&lt;b&gt;Al&lt;/b&gt;&lt;/font&gt;&lt;/td&gt; <br />&lt;td bgcolor="&lt;?PHP echo $defaultbgcolor ?&gt;" valign="middle" align="center" width="7%"&gt;&lt;font face="&lt;?PHP echo $fontfamily ?&gt;" size="1"&gt;&lt;b&gt;Ar&lt;/b&gt;&lt;/font&gt;&lt;/td&gt; <br />&lt;td bgcolor="&lt;?PHP echo $defaultbgcolor ?&gt;" valign="middle" align="center" width="7%"&gt;&lt;font face="&lt;?PHP echo $fontfamily ?&gt;" size="1"&gt;&lt;b&gt;Az&lt;/b&gt;&lt;/font&gt;&lt;/td&gt; <br />&lt;td bgcolor="&lt;?PHP echo $defaultbgcolor ?&gt;" valign="middle" align="center" width="7%"&gt;&lt;font face="&lt;?PHP echo $fontfamily ?&gt;" size="1"&gt;&lt;b&gt;Og&lt;/b&gt;&lt;/font&gt;&lt;/td&gt; <br />&lt;td bgcolor="&lt;?PHP echo $defaultbgcolor ?&gt;" valign="middle" align="center" width="7%"&gt;&lt;font face="&lt;?PHP echo $fontfamily ?&gt;" size="1"&gt;&lt;b&gt;Or&lt;/b&gt;&lt;/font&gt;&lt;/td&gt; <br />&lt;td bgcolor="&lt;?PHP echo $defaultbgcolor ?&gt;" valign="middle" align="center" width="7%"&gt;&lt;font face="&lt;?PHP echo $fontfamily ?&gt;" size="1"&gt;&lt;b&gt;Lb&lt;/b&gt;&lt;/font&gt;&lt;/td&gt; <br />&lt;/tr&gt; <br />&lt;?PHP <br />if($dayone != 0) <br />$span1 = $dayone; <br />if(6 - $daylast != 0) <br />$span2 = 6 - $daylast; </p>

<p>for($i = 1; $i &lt;= $days; $i++): <br />$dayofweek = date("w",mktime(1,1,1,$month,$i,$year)); <br />$width = "7%"; </p>

<p>if($dayofweek == 0 || $dayofweek == 6) <br />$width = "7%"; </p>

<p>if($i == $today): <br />$fontcolor = $todayfontcolor; <br />$bgcellcolor = $todaybgcolor; <br />endif; <br />if($i != $today): <br />$fontcolor = $defaultfontcolor; <br />$bgcellcolor = $defaultbgcolor; <br />endif; </p>

<p>if($i == 1 || $dayofweek == 0): <br />echo " &lt;tr bgcolor='$defaultbgcolor'&gt; <br />"; <br />if($span1 &gt; 0 &amp;&amp; $i == 1) <br />echo " &lt;td align='left' bgcolor='$defaultbgcolor' colspan='$span1'&gt;&lt;font face='null' size='1'&gt;&amp;nbsp;&lt;/font&gt;&lt;/td&gt; <br />"; <br />endif; <br />?&gt; <br />&lt;td bgcolor="&lt;?PHP echo $bgcellcolor ?&gt;" valign="middle" align="center" width="&lt;?PHP echo $width ?&gt;"&gt;&lt;font color="&lt;?PHP echo $fontcolor ?&gt;" face="&lt;?PHP echo $fontfamily ?&gt;" size="1"&gt;&lt;?PHP echo $i ?&gt;&lt;/font&gt;&lt;/td&gt; <br />&lt;?PHP <br />if($i == $days): <br />if($span2 &gt; 0) <br />echo " &lt;td align='left' bgcolor='$defaultbgcolor' colspan='$span2'&gt;&lt;font face='null' size='1'&gt;&amp;nbsp;&lt;/font&gt;&lt;/td&gt; <br />"; <br />endif; <br />if($dayofweek == 6 || $i == $days): <br />echo " &lt;/tr&gt; <br />"; <br />endif; <br />endfor; <br />?&gt; </p>

<p>&lt;/table&gt;</p>

hasier

hasier 2006-11-30 14:59 #2

<p>Aupa,azaldu ahal diezadake baten batek ondorengo lerroetan gorriz&nbsp;agertzen diren "?" zer esan nahi duten?</p>

<p>$fontfamily = isset($fontfamily) <strong>?</strong> $fontfamily : "Tahoma, Geneva, sans-serif"; </p>

<p>$defaultfontcolor = isset($defaultfontcolor) <strong>?</strong> $defaultfontcolor : "#00000000"; </p>

<p>$defaultbgcolor = isset($defaultbgcolor) ? $defaultbgcolor : "#FFFFFF"; </p>

<p>$todayfontcolor = isset($todayfontcolor) ? $todayfontcolor : "#FFFFFF"; </p>

<p>$todaybgcolor = isset($todaybgcolor) ? $todaybgcolor : "#CC0000"; </p>

<p>$monthcolor = isset($monthcolor) ? $monthcolor : "#333399";</p>

<p>
<p>Eskerrik asko</p>
</p>

gu geu

gu geu 2006-11-30 17:28 #3

Isset-ek aldagaia ia definitua dagoen adierazten du. aldagaia definitua badago, orduan kolorea ematen dio.

hasier

hasier 2006-12-13 16:51 #4

aupa lagunak,galdera bat neukan zuentzat.<br />
Gauza da&nbsp; php-rekin serbitzarira argazki edo fitxero batzuk&nbsp;
igo nahi ditudala eta hurrengo errorea besteriik ez zait agertzen:<br />
&nbsp;<strong>Warning</strong>: copy(mail056.gif): failed to open stream: No such file or directory in <strong>/home/hugarte/public_html/subir/subir.php</strong> on line <strong>9<br />
</strong>eta 9.lerroan daukaten sententzia hurrengua da::<br />
&nbsp;&nbsp;&nbsp; copy($archivo,$archivo);<br />
Era ezberdinak probatu ditut move_uploaded_file() funtzioa erabilita
ruta desberdin baten&nbsp; sartzen ahaleginduta... baina ezerrez.<br />
Baten batek arazoa zein den jakingo balu&nbsp; erantzun mesedez.<br />
Aldez aurretuk mila esker eta segi horrela.<br />


Utzi iruzkina: