Jump to content
xisto Community

coldasice

Members
  • Content Count

    34
  • Joined

  • Last visited

About coldasice

  • Rank
    Member [ Level 1 ]
  • Birthday 04/04/1988

Profile Information

  • Gender
    Male
  • Location
    Norway
  1. thanks.. i dont know ajax.. only php.. dont know js either =D but i get to it =D
  2. mby u forgot or did anything wrong in the connection of mysql db.. or else mby iu forgot to change table name or somthing =D
  3. how to make this clock auto refresh =?or go like those flash clocks =) is what i realy meant
  4. any ways.. use md5($password) for secure password
  5. well its almoust the same on wamp enter localhost and on left side at bottm it is.. or just type localhost/phpmyadmin -.- no diffrence =)
  6. hmmmm... strange.. when i put this in my admin.php... it dosnt work.. but when i put it in a include file it works.. O.o like $mode = $_GET['mode']; $id3 = $_GET['id']; if ($do == "admin"){ // if do=admin, do... if ($mode == "edit"){ // if mode=edit, do... if ($id3 == "3"){ include "edit.admin.php"; } else { include ('admin.php'); } } } linenums:0'>$do = $_GET['do'];$mode = $_GET['mode'];$id3 = $_GET['id'];if ($do == "admin"){ // if do=admin, do...if ($mode == "edit"){ // if mode=edit, do...if ($id3 == "3"){include "edit.admin.php";} else {include ('admin.php');}}} and put it in.. include.edit.php and do like in admin.php i do include ('include.edit.php') then i just refreseh admin.php and add the include in top.. ;=) it basicly works... but not the way its suppost when i use it as an include -.- .. but when i add the pure code.. in to admin.php it dont work at all (( <--- scratch that.. it works.. seems like it works =D.. btw if i put a hidden field or two in the form.... in admin.. can i then use that instead of those ifs? question 2. if($subaction == "new"){ echoheader("options", "New Template"); echo"<form method=post action=\"$PHP_SELF\"><table border=0 cellpading=0 cellspacing=0 width=100% height=100%><tr><td >Create new template based on: <select name=base_template>"; foreach($templates_list as $single_template){ echo "<option value=\"$single_template\">$single_template</option>"; } echo '</select> with name <input type=text name=template_name> <input type=submit value="Create Template"> <input type=hidden name=mod value=options> <input type=hidden name=action value=templates> <input type=hidden name=subaction value=donew> </td></tr></table></form>'; echofooter(); exit; } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Do Create the new template ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ if($subaction == "donew"){ if(!eregi("^[a-z0-9_-]+$", $template_name)){ msg("error", "Error", "The name of the template must be only with letters and numbers", "$PHP_SELF?mod=options&subaction=new&action=templates"); } if(file_exists("./data/${template_name}.tpl")){ msg("error", "Error", "Template with this name already exists", "$PHP_SELF?mod=options&subaction=new&action=templates"); } if($base_template != ""){ $base_file = "./data/${base_template}.tpl"; } else{ $base_file = "./data/Default.tpl"; } if (!copy($base_file, "./data/${template_name}.tpl")) { msg("error", "Error", "Can not copy file $base_file to ./data/ folder with name ${template_name}.tpl"); } @chmod("./data/${template_name}.tpl", 0777); msg("info", "Template Created", "A new template was created with name <b>${template_name}</b><br>", "$PHP_SELF?mod=options&action=templates"); }here i noticed.. these <input type=hidden name=subaction value=donew> if($subaction == "donew") so do these 2 have any thing in common? but why is name $subaction?.. and why cant i find any $subaction =.. only $subaction ==.. :(
  7. im sorry for all the questioning.. this makes it easyer =) gona test now =D [edit] thanks this works.. but just wondering where to place this????? like in my edit.. or just in my "template"?
  8. i think u all misunderstand me... i dont care about layout...... i care about code... jlhaslip.. i dont understand yours... basicly this template comes from cutenews... and when i press a link.. it uses template.. and get all links inside.. the .. like when i press news... it goes template.com/index.php?do=news?id=12&mod=edit.. for example :=) <- this will show in adress bar and when it does it access page news with id2 and in edit mode =) <- example... and all that happens in index template.. [hr=noshade] [/hr] lets go over this again.... what i want to do when do=admin is show feks the admin.php and when it shows do=admin&mode=edit&id=1 it shows the edit.admin.php where the user is id 1 think i formuled it better=? and i dont know if this is written in the template.. or in the edit.admin.php =?
  9. yeah i guessed so.... -.- but its the function not the layout... i have another look now that im awake =D
  10. ARG!!! still dont get it.... can u post result.. on that one.. maby that clears it.. maby fill in the id.. -.- sorry im at a total stop -.-
  11. hmm.. didnt quite understand so u say if i do somthing like this`? elseif($_POST['do'] == "admin") { elseif ($_POST['&id'] == '$id'){include("./edit.admin.php");} } it will enter edit.admin.php with these tags? do=admin&id=1 ? btw i guess u know where i found this.. can this be done inside the edit.admin.php or a function? i just thought it way of doing this was awsome.. the other ones i just get blank side of.. nvm this.. just slipped.. <- delete
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.