Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
Kako najlakše skresati ovakav kod?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
fx



Joined: 15 Sep 2004
Posts: 19
Location: Zagreb

PostPosted: 12.07.2006 20:40    Post subject: Kako najlakše skresati ovakav kod? Add user to your forum ignore list Reply with quote

Quote:

// domagoj
switch ($_COOKIE['domagoj']) {
case '1':
include('block_domagoj.php');
echo "<br />";
break;

case '2':
break;

default:
include('block_domagoj.php');
echo "<br />";
break;
}

// dragutin
switch ($_COOKIE['dragutin']) {
case '1':
include('block_dragutin.php');
echo "<br />";
break;

case '2':
break;

default:
include('block_dragutin.php');
echo "<br />";
break;
}


Toga naravno ima u nedogled samo više , znam da bih se takvo što najbolje sredilo bazom, no, ja preferiram ovaj način, pa ako može neki hint, ne pada mi ništa na pamet....
Rolling Eyes
thnx unaprijed
Back to top
View user's profile Send private message Visit poster's website
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 12.07.2006 21:08    Post subject: Add user to your forum ignore list Reply with quote

ja bi ga skresao sa SHIFT-delete i pitanjem što uopće želiš napravit

...iz ovoga baš nije jasno
Back to top
View user's profile Send private message Send e-mail Visit poster's website
fx



Joined: 15 Sep 2004
Posts: 19
Location: Zagreb

PostPosted: 13.07.2006 16:03    Post subject: Add user to your forum ignore list Reply with quote

hehe Smile

ovako, čovjek na stranici izbor.php izabere određene stvari koje se spremaju u cookie, tj. da mu se na index.php pojavi domagoj, dragutin, mirko, slavko preko ove forme koju sam napisao, drugim riječima tih mirka i slavka ima podosta i kod je oveći ... ali se ponavlja, neznam baš najbolje sa php-om pa pitam ako postoji neki elegantnije način da iz cookija dobijem include tih ljudi tj. određenog koda.
Back to top
View user's profile Send private message Visit poster's website
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 13.07.2006 17:14    Post subject: Add user to your forum ignore list Reply with quote

hehe Smile

nemam pojma o čemu pričaš

što se sprema u cookie i kakve veze imaju mirko i slavko sa ičime? ako je ono što radiš neka tajna onda jednostavno postavi problem na taj način da ima smisla, ali da se ne kuži što uistinu radiš - svi sretni
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tedius



Joined: 22 Dec 2003
Posts: 149
Location: Zagreb

PostPosted: 13.07.2006 17:17    Post subject: Add user to your forum ignore list Reply with quote

Otrilike za prvu ruku
Code:

foreach($_COOKIE as $key=>$val){
 if($val=='1'){
  include('block_'.$key.'.php');
  echo "<br />";
 }
}
Back to top
View user's profile Send private message Visit poster's website
fx



Joined: 15 Sep 2004
Posts: 19
Location: Zagreb

PostPosted: 13.07.2006 19:30    Post subject: Add user to your forum ignore list Reply with quote

Probat ću, hvala!
Back to top
View user's profile Send private message Visit poster's website
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 13.07.2006 21:10    Post subject: Add user to your forum ignore list Reply with quote

daj ne ohrabruj čovjeka da tako piše code Sad

htio sam ga uvjerit da krivo razmišlja, a ti si mu lijepo servirao antirješenje i sad je zadovoljan Razz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
fx



Joined: 15 Sep 2004
Posts: 19
Location: Zagreb

PostPosted: 13.07.2006 22:03    Post subject: Add user to your forum ignore list Reply with quote

lol*?
Back to top
View user's profile Send private message Visit poster's website
Tedius



Joined: 22 Dec 2003
Posts: 149
Location: Zagreb

PostPosted: 13.07.2006 22:41    Post subject: Add user to your forum ignore list Reply with quote

Sulien wrote:
daj ne ohrabruj čovjeka da tako piše code Sad

htio sam ga uvjerit da krivo razmišlja, a ti si mu lijepo servirao antirješenje i sad je zadovoljan Razz


OK.

Onda pogledaj PHP Manual kak se radi s Array, Cookies, petljama i ostalim. Laughing
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group