Snaip3Rs Posted January 8, 2010 Report Share Posted January 8, 2010 Līdz pilnībai man trūks salabot pēdējo skriptu! Man ir lūk šāds vienkārš skripts! <?php $url = "/img/"; $monImage = "$url"."7.jpg"; $tueImage = "$url"."8.jpg"; $wedImage = "$url"."9.jpg"; $thurImage = "$url"."10.jpg"; $friImage = "$url"."11.jpg"; $weekendImage = "$url"."12.jpg"; $d = date("D"); switch ($d) { case Mon: echo "<img src=$monImage width=160 height=200>\n"; break; case Tue: echo "<img src=$tueImage width=160 height=200>\n"; break; case Wed: echo "<img src=$wedImage width=160 height=200>\n"; break; case Thu: echo "<img src=$thurImage width=160 height=200>\n"; break; case Fri: echo "<img src=$friImage width=160 height=200>\n"; break; default: echo "<img src=$weekendImage width=160 height=200>\n"; } ?> Kā var uztaisīt lai nebūtu man katru nedēļu jānumurē bildes bet viņas liktos pēc dienām uz jauno gadu 356.jpg piemēram tā! Un lai varētu viņu palielināt uzklikšķinot! Quote Link to comment Share on other sites More sharing options...
xPtv45z Posted January 8, 2010 Report Share Posted January 8, 2010 echo "<img src='".$url.date('z').".jpg' width=160 height=200>\n"; Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted January 8, 2010 Author Report Share Posted January 8, 2010 strādāt izskatās ka strādā, bet atpaliek par vienu dienu šodien ir 8 bet bildi viņš ņem tikai 7 un nevar viņu palielināt! Bet paldies par to pašu! :) Quote Link to comment Share on other sites More sharing options...
2easy Posted January 8, 2010 Report Share Posted January 8, 2010 ja atpaliek par 1, tad pieskaiti 1 ;) un bildi palielina, uzliekot linku uz lielāku bildi Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted February 9, 2010 Author Report Share Posted February 9, 2010 Lūkur ir tas kods, echo "<img src='/img/'".$url.date('z').".jpg' width=160 height=200>\n"; bet kā uztaisīt lai būtu autopalielināšana kad uzklikšķina un border 2 <a href="bilde"><img src="bilde" width="160" height="200"/></a> Quote Link to comment Share on other sites More sharing options...
eude Posted February 9, 2010 Report Share Posted February 9, 2010 (edited) ja tu lieto $url, tad priekškam vēl priekšā liec /img/ ? to jau tu esi norādījis un 2reiz to nevajag. echo "<a href='/img/lielābilde-".date('z').".jpg'><img src='/img/'".date('z').".jpg' width=160 height=200></a>\n"; Edited February 9, 2010 by eude Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.