![]() |
|
#1
|
|||
|
|||
folder problem in treeshi,
anybody there who can help me out from some strange situation actually im newbie in php and i got somebody s spaghettis code and i changed it entirely as in older code there r lot of arrays used and i tried to make it simpler now problem is when i try to click on trees whether its parent or child im not able to get relevent pages on right frame but if i use older one then it shows all folders for all users and i cant set any rights for that if anybody is really interested then i cna post my code thanks and regards |
|
#2
|
||||
|
||||
|
Please post your code.
We can't help you without that code |
|
#3
|
|||
|
|||
|
thanks alor for ur feedback well im struggling to get 3rd frame for internal users and 2 frames for external users dont no what went wrong and im using version php 4.0.6
when internal user logins its showing 2 frames and ugliest part in left frame it shows scroll down bottom plz have a look at server2.vitodesign.com with user err and pwd as err it must show 3 frames as this suer is internal but it shows only 2 frames plz have alook at attched file if not clear plz let me no as its not going to if block in attached code thansk alot |
|
#4
|
||||
|
||||
|
I suggest you to change this code:
PHP Code:
to: PHP Code:
It just checks the user in the database, if it's there mysql_num_rows will return 1 and send the user to the 3 frame page. I haven't checked if it works. but it should be |
|
#5
|
|||
|
|||
|
sorry its not working unfortunately
thanks |
|
#6
|
||||
|
||||
|
Oops...
this sql should work... PHP Code:
note the AND |
|
#7
|
|||
|
|||
|
sorry still it not works
in login.php <? $sql = "SELECT user FROM t_user WHERE account = '".$HTTP_POST_VARS['account']."' AND intern = 't'"; $res = mysql_query($sql); $user_c = mysql_num_rows($res); if ($user_c == 1) { header("Location: index.phtml?mode=intern;");//having 3 frames for internal users } else { header("Location: index.phtml?mode=extern;");//having 2 frames for external users } ?> and in index.php list($user) = once_query_array("SELECT user FROM t_user WHERE intern='t'"); $urlleft = "browsing.phtml?diradr=".$HTTP_GET_VARS['diradr']."&dirname=".$HTTP_GET_VARS['dirname'].""; if (isset($HTTP_GET_VARS["syspk"])) { $urlrigth = "filelist.phtml?tree=".$HTTP_GET_VARS['syspk'].""; } else { $urlrigth = "blank.phtml"; } if (($HTTP_GET_VARS['mode']=='intern' && $user) ){ $loc = "log.phtml"; <html> ------ ....... } else {} its goign to else block thanks |
|
#8
|
||||
|
||||
|
Damn...
In the sql "WHERE account = " should be "WHERE user =" I always get messedup when using another name for the posted value then for the colum name |
|
#9
|
|||
|
|||
|
still wont works
|
|
#10
|
||||
|
||||
|
Here goes the debugging...
from this line if (($HTTP_GET_VARS['mode']=='intern' && $user) ){ can you remove the " && $user" and see what happens. could be a problem there. also try echo $HTTP_GET_VARS['mode']; and var_dump($user); |
Recent GIDBlog
2nd Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem with php5 cgi installation | fab13 | Apache Web Server Forum | 3 | 19-Nov-2003 09:11 |
| problem to access htdocs folders | fraggle two | Apache Web Server Forum | 5 | 12-Nov-2003 00:40 |
| unwanted scrollbar problem | kelly001 | Web Design Forum | 3 | 24-Oct-2003 10:44 |
| PHP/CSS/Netscape/IE problem... :-D | mateo1221 | Web Design Forum | 1 | 24-Sep-2003 16:55 |
| client side problem | zuzupus | MySQL / PHP Forum | 2 | 22-Jul-2003 06:47 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The