
wezze
Members-
Posts
57 -
Joined
-
Last visited
Never
Everything posted by wezze
-
how do i get this <?php echo $lang['']; ?> into this code where the text is? <? /** * Just a little page footer, tells how many registered members * there are, how many users currently logged in and viewing site, * and how many guests viewing site. Active users are displayed, * with link to their user information. */ echo "<center><b>Totaal geregistreerde leden:</b> ".$database->getNumMembers()."<br>"; echo "Er zijn $database->num_active_users registreerde leden en "; echo "$database->num_active_guests bezoekers online.<br><br></center>"; include("../../www/log/view_active.php"); ?> thx
-
lol idd there was alrdy a table with home in it next time ill drop it 1. thx allot
-
Hi i need the following db for mutli language script but i get the following error #1062 - Duplicate entry 'home' for key 'id' this is the .sql CREATE TABLE IF NOT EXISTS `modlang` ( `id` varchar(15) NOT NULL, `en` text NOT NULL, `fr` text NOT NULL, `nl` text NOT NULL, UNIQUE KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `modlang` -- INSERT INTO `modlang` (`id`, `en`, `fr`, `nl`) VALUES ('home', 'Home', 'Accueill', 'Home'), ('members', 'Members', 'Membre', 'Leden'), ('album', 'Album', 'Album', 'Album'), ('calender', 'Calender', 'Calendrier', 'Kalender'), ('contact', 'Contact', 'Contact', 'Contact'), ('register', 'Register', 'S inscrire', 'Inschrijven'), ('guestbook', 'Guestbook', 'Livre d or', 'Gastenboek'), ('movies', 'Movies', 'Film', 'Filmen'), ('link', 'Link', 'Lien', 'Links'), ('welcome', 'Welcome', 'Bienvenue', 'Welkom'), ('info', 'Info', 'Info', 'Info'), ('member', 'Member', 'Membre', 'Lid'), ('fillout', 'Fill out the form below and we will contact you as soon possible.', 'Remplissez le formulaire ci-dessous et nous vous contacterons d?s possible', 'Vul dan snel onderstaand formulier in en wij contacteren u zo snel mogenlijk.'), ('name:', 'Name:', 'Nom:', 'Naam:'), ('birth date:', 'Birth date:', 'Date de naissance:', 'Geboorte datum:'), ('sex:', 'Sex:', 'Sexe:', 'Geslacht:'), ('city:', 'City:', 'Ville:', 'Stad:'), ('country:', 'Country:', 'Pays:', 'Land:'), ('postal:', 'Postal code:', 'Code postal:', 'Postcode:'), ('street:', 'Street:', 'Rue:', 'Straat:'), ('back', 'Back', 'Retour', 'Terug'), ('next', 'Next', 'Suivenant', 'Volgende'), ('login', 'Login', 'login', 'Inloggen'), ('password', 'Password', 'Mot de passe', 'Wachtwoord'), ('fw', 'Forgot password?', 'Mot de passe oubli??', 'Wachtwoord vergeten?'); i dont get why i cant use an entry multi times. thx
-
i found a solution of a multi language script with ajax,mysql,php im trying to understand it but the menu problem is solved. thx
-
what about 2 languages would this causse any problems? /name /www /nl index.php /fr index.php /js /includes /nl /fr /images /css /lightbox thanks
-
ok im working on my new folder structure now. but stuff like lightbox where do i put that do i strip that folder too, so js, css ,images do i put them within my js, css, images folder or do i leave it like that? made this up till now /name /www index.php /js /includes /images /css The reason my folder structure was like this is because of...lazzynes?
-
so the only file that needs to be in my root is index.php? and stuff like admin center? what do you mean with autoload files?? thx
-
Hi im using includes for my menu's now the problem i have is when files are in the same folder its easy i just use <a href=\"test1.php\">test1</a> when sub folder <a href=\"../test1.php\">test1</a> but what to do with this?? lets say your this is my menu if($session->isAdmin()) { echo "<li><a href=\"../test.php\">test</a></li>"; echo "<li><a href=\"test1.php\">test1</a></li>"; echo "<li><a href=\"../test2.php\">test2</a></li>"; echo "<li><a href=\"../testfolder/test3.php\">test3</a></li><br>"; } now lets say im on page test1 and click the test3 page ill go to test3 page, now heres my problem when on page test3 and clicking page test i get an error causse i use the same menu as include for everything is there a way to fix this?? hope my example makes any sense thx
-
cant find it :s i geusse ill look for something else or try to find some tutorials thx anyway
-
<? if($session->logged_in){ echo "<h3>Menu</h3>"; echo "<li><a href=\"userinfo.php?user=$session->username\">Mijn Account</a></li>" ."<li><a href=\"useredit.php\">Instellingen</a></li>"; echo "<p> </p>"; if($session->isAdmin()){ echo "<li><a href=\"filmen_leden.php\">Filmen</a></li>" ."<li><a href=\"links.php\">links</a></li>" ."<li><a href=\"upload_kalender/upload.form.php\">upload kalender</a></li>" ."<li><a href=\"../livre d'or/admin/index.php\">livre d'or</a></li>" ."<li><a href=\"../gastenboek/admin/index.php\">Gastenboek</a></li>" ."<li><a href=\"admin/index.php?id=1\">Admin Center</a></li>"; } echo "<p> </p>" ."<li><a href=\"process.php\">Logout</a></li>"; } ?> you mean this? atm its still set for users and admin only.
-
<?php if( $session->=(3)(5)(7)){ // but then it doesnt matter what lvl they are thell all see the same here? if( $session->isAdmin()){ // do something } } thx
-
ok but if i do it otherwise and the user isnt admin the script wont bother to look for 7, 5 ect and if i would use elseif would that do the trick? like <?php if( $session->Logged_in){ // do something if( $session->isAdmin()){ // do something elseif($session->isUserlevel(7)){ // do something } } } thx
-
i dont need any1 to do it for me i only need a little puch in the right direction. ive been google-ing like hell on this subject and cant find anything thats why i posted here. i rlly dont get why the script stops at the first if session. thx
-
ok but how? thx
-
Well not rlly i only need to lvl the members of the club non members stay at low lvl. So i only need to make 1 a mod so he can help me with uploads of pics ect... and then the rest members ,so that the members cant mess around. I need to activate acounts so i might aswell asign a lvl while im busy its not that we got 100 members (yet).
-
in my admin cp i chose who get which lvl. i just modified last post
-
thats exactly what i want that the admin/lvl9 can see everyting and a user as good as nothing. i dont rlly understand this option check if user level is >= 5/7/9, which would return true for admin to see mod privs how do i approach this? or is it possible to redirect each lvl to another page? thanks
-
ok im having trouble with the session thing this is my include file for my side menu every lvl got other links to show but it only displays the if( $session->logged_in part it ignores the rest. So my question is what im i missing or doing wrong here? <? /** * Users can see logged_in * Members --> lvl5 * Mods --> lvl7 * Admin/lvl9 isAdmin */ if( $session->logged_in){ echo "<h3>Menu</h3>"; echo "<li><a href=\"userinfo.php?user=$session->username\">My Account</a></li>" ."<li><a href=\"useredit.php\">Edit Account</a></li>"; echo "<p> </p>"; if( $session->isUserlevel(5)){ echo "<li><a href=\"filmen_leden.php\">Filmen</a></li>"; if( $session->isUserlevel(7)){ echo "<li><a href=\"links.php\">links</a></li>" ."<li><a href=\"upload_kalender/upload.form.php\">upload kalender</a></li>"; if($session->isAdmin()){ echo "<li><a href=\"../livre d'or/admin/index.php\">livre d'or</a></li>" ."<li><a href=\"../gastenboek/admin/index.php\">Gastenboek</a></li>" ."<li><a href=\"admin/index.php?id=1\">Admin Center</a></li>"; } echo "<p> </p>" ."<li><a href=\"process.php\">Logout</a></li>"; }}} ?> thx
-
ive got a login script that works great only the update lvl of users doesnt work if i do it directly in myphp it works but not with the php script. constants.php define("ADMIN_NAME", "admin"); define("MOD_NAME", "Mod"); define("MEMBER_NAME", "Member"); define("USER_NAME", "User"); define("GUEST_NAME", "Guest"); define("ADMIN_LEVEL", 9); define("MOD_LEVEL", 7); define("MEMBER_LEVEL", 5); define("USER_LEVEL", 2); define("GUEST_LEVEL", 0); admin.php Username:<br> <input type="text" name="upduser" maxlength="30" value="<? echo $form->value("upduser"); ?>"> </td> <td> Level:<br> <select name="updlevel"> <option value="1">1 <option value="1">2 <option value="1">5 <option value="1">7 <option value="9">9 </select> </td> <td> <br> <input type="hidden" name="subupdlevel" value="1"> <input type="submit" value="Update Level"> </td></tr> </form> im struggling on this for 2 weeks now so any help would be great thx
-
ok ive added this if ($_SESSION[ 'member' ]==2) { echo 'some text'; } elseif ($_SESSION[ 'user' ]==5) { echo 'some text'; } but the problem i have is in my admin center when i change a userslvl it doesnt change i can only change it to 1or9 when i choose 2,5,7 it becomes 1. Any ideas what im doing wrong or forgetting? This is my DB var $connection; //The MySQL database connection var $num_active_users; //Number of active users viewing site var $num_active_guests; //Number of active guests viewing site var $num_members; //Number of signed-up users /* Note: call getNumMembers() to access $num_members! */ do i need to add something here? thx
-
Hi i was wondering how to add userlvls to an existing login script. this is what i alrdy did constant.php efine("ADMIN_NAME", "admin"); define("MOD_NAME", "Mod"); define("MEMBER_NAME", "Member"); define("USER_NAME", "User"); define("GUEST_NAME", "Guest"); define("ADMIN_LEVEL", 9); define("MOD_LEVEL", 7); define("MEMBER_LEVEL", 5); define("USER_LEVEL", 2); define("GUEST_LEVEL", 0); now i was wondering how to use this in this part index.php if($session->logged_in){ echo 'some text'; if($session->isAdmin()){ echo "some text"; } echo "<p> </p>" ."<center>[<a href=\"process.php\">Logout</a>]</center>"; } ?> and if i need to add/change more then this? thx
-
what do you mean with session[user_id] is not set? <?php <?php if( isset($_SESSION['user_id'] ): ?> <p><strong>My Account</strong></p> [<a href="myaccount.php">My Account</a>]<br> [<a href="mysettings.php">Settings</a>]<br> [<a href="../filmen_leden.php">Filmen</a>]<br> <p> </p> [<a href="logout.php">Logout </a>] <p> </p> <p> </p> <p> </p> <?php endif; ?> <?php if( checkAdmin ): ?> <p>[<a href="admin.php">Admin CP </a>]</p> [<a href="../links.php">links</a>]<br></li> [<a href="../gastenboek/admin/index.php">Gastenboek</a>]<br> [<a href="../livre d'or/admin/index.php">livre d'or</a>]<br> [<a href="../upload_kalender/upload.form.php">upload kalender</a>]<br> <?php endif; ?> is this what you mean with the conditionals and loops? thx
-
Hi im trying to get this into an include <?php /*********************** MYACCOUNT MENU **************************** This code shows my account menu only to logged in users. Copy this code till END and place it in a new html or php where you want to show myaccount options. This is only visible to logged in users *******************************************************************/ if (isset($_SESSION['user_id'])) {?> <div class="myaccount"> <p><strong>My Account</strong></p> [<a href="myaccount.php">My Account</a>]<br> [<a href="mysettings.php">Settings</a>]<br> [<a href="../filmen_leden.php">Filmen</a>]<br> [<a href="logout.php">Logout </a>] <p></p></div> <p> </p> <p> </p> <p> </p> <?php } if (checkAdmin()) { /*******************************END**************************/ ?> <p> [<a href="admin.php">Admin CP </a>]</p> <?php } ?> [<a href="../links.php">links</a>]<br> [<a href="../gastenboek/admin/index.php">Gastenboek</a>]<br> [<a href="../livre d'or/admin/index.php">livre d'or</a>]<br> [<a href="../upload_kalender/upload.form.php">upload kalender</a>]<br> </td> but it doesnt show in my side menu this is the original code <table width="100%" border="0" cellspacing="0" cellpadding="5" class="main"> <tr> <td colspan="3"> </td> </tr> <tr> <td width="160" valign="top"> <?php /*********************** MYACCOUNT MENU **************************** This code shows my account menu only to logged in users. Copy this code till END and place it in a new html or php where you want to show myaccount options. This is only visible to logged in users *******************************************************************/ if (isset($_SESSION['user_id'])) {?> <div class="myaccount"> <p><strong>My Account</strong></p> [<a href="myaccount.php">My Account</a>]<br> [<a href="mysettings.php">Settings</a>]<br> [<a href="../filmen_leden.php">Filmen</a>]<br> [<a href="logout.php">Logout </a>] <p></p></div> <p> </p> <p> </p> <p> </p> <?php } if (checkAdmin()) { /*******************************END**************************/ ?> <p> [<a href="admin.php">Admin CP </a>]</p> <?php } ?> [<a href="../links.php">links</a>]<br> [<a href="../gastenboek/admin/index.php">Gastenboek</a>]<br> [<a href="../livre d'or/admin/index.php">livre d'or</a>]<br> [<a href="../upload_kalender/upload.form.php">upload kalender</a>]<br> </td> <td width="732" valign="top"><p> </p> <h3 class="titlehdr">Welcome <?php echo $_SESSION['user_name'];?></h3> <?php if (isset($_GET['msg'])) { echo "<div class=\"error\">$_GET[msg]</div>"; } ?> <p>This is the my account page</p> </td> <td width="196" valign="top"> </td> </tr> <tr> <td colspan="3"> </td> </tr> </table> any ideas? thx
-
ok cool but is that the only piece of code ill need? I had a quick look on google (now i know what to look for) and saw they use <head><script src="http://code.jquery.com/jquery-latest.js"></script></head> will i need to put this in too? <script> $("section#content article").load("includes/article1_nl2.php"); </script> thx