Tech name cannot be blank.
"; } // test for name unique if (mysqli_num_rows(mysqli_query($db,"select techid from techs where techname=\"$name\" and techid!=\"$techid\""))) { if (mysqli_num_rows(mysqli_query($db,"select techid from techs where techname=\"$name\""))) { $nameunique=0; echo " Tech name already exists.
"; } else { $nameunique=1; } } else { $nameunique=1; } // test for matching passwords if ($pass!="password_is_unchanged") { if ($pass==$passconf) { $passmatch=1; $passhash=password_hash($pass,PASSWORD_DEFAULT); $namepassupdqry=("update techs set techname=\"$name\",techpass=\"$passhash\" where techid=\"$techid\""); } else { $passmatch=0; echo " The passwords you supplied don't match.
"; } } else { $passmatch=1; $namepassupdqry="update techs set techname=\"$name\" where techid=\"$techid\""; } if ($namesuppld && $nameunique && $passmatch) { mysqli_query($db,$namepassupdqry); mysqli_query($db,"update techs set shift=\"$shift\" where techid=\"$techid\""); } } if ($updatedisplay) { // display settings if ($display_showts) $display_showts=1; else $display_showts=0; if ($display_techalpha=="a") $display_techalpha=1; else $display_techalpha=0; if ($display_subjalpha=="a") $display_subjalpha=1; else $display_subjalpha=0; // test for urlchunk supplied if (strlen(trim($display_urlchunk))) { $chunksuppld=1; } else { $chunksuppld=0; echo " URL chunk size cannot be blank.
"; } if ($chunksuppld) { putsetting('url_chunk_size',$display_urlchunk,$techid); putsetting('show_ts',$display_showts,$techid); putsetting('tech_alpha',$display_techalpha,$techid); putsetting('subj_alpha',$display_subjalpha,$techid); putsetting('log_style',$display_logstyle,$techid); } } if ($setcolor) { // color settings $hexcolor="#".ltrim($hexcolor); putsetting($modcolor,$hexcolor,$techid); } if ($resetcustom) mysqli_query($db,"delete from customs where customtech=\"$techid\""); sidemenu(); pageblock("left","end"); } pageblock("right","begin"); // pull my current data from tables $curname=dblookup($db,"techs","techid","techname",$techid); $curshift=dblookup($db,"techs","techid","shift",$techid); $pass=$passconf="password_is_unchanged"; // other values from customs $curlchunk=getsetting('url_chunk_size',$techid)["value"]; $curts=getsetting('show_ts',$techid)["value"]; $curtdo=getsetting('tech_alpha',$techid)["value"]; $cursdo=getsetting('subj_alpha',$techid)["value"]; $curbgc=getsetting('background_color',$techid)["value"]; $cursbc=getsetting('sidebar_color',$techid)["value"]; $curmbgc=getsetting('menubg_color',$techid)["value"]; $curtc=getsetting('text_color',$techid)["value"]; $curlc=getsetting('link_color',$techid)["value"]; $curvlc=getsetting('vlink_color',$techid)["value"]; $curhc=getsetting('heading_color',$techid)["value"]; $curlogstyle=getsetting('log_style',$techid)["value"]; // show the form echo "
My Information

Tech Name (first and last name):  

Password:  

Repeat Password:  

Need a random password?   "; $rpw=substr(str_shuffle(password_hash(microtime(),PASSWORD_DEFAULT)), 10, 12); echo "   $rpw

Shift:  

    


My Display Preferences

Log style (the look of the log notes display):   

URL Chunk Size (long URLs will be linewrapped at this many characters):  

Show timestamps in log notes:    "; if ($curts) { echo ""; } else { echo ""; } echo "

Techs display order:    "; if ($curtdo) { echo " Alphabetical order      Database order "; } else { echo " Alphabetical order      Database order "; } echo "

Subjects display order:    "; if ($cursdo) { echo " Alphabetical order      Database order "; } else { echo " Alphabetical order      Database order "; } echo "

    


My Color Preferences

"; switch($modcolor) { case "background_color": echo "
Page background color"; colorpicker("profile.php?setcolor=1&modcolor=background_color&hexcolor="); echo "

"; break; case "sidebar_color": echo "
Sidebar color"; colorpicker("profile.php?setcolor=1&modcolor=sidebar_color&hexcolor="); echo "

"; break; case "menubg_color": echo "
Menu background color"; colorpicker("profile.php?setcolor=1&modcolor=menubg_color&hexcolor="); echo "

"; break; case "text_color": echo "
Normal text color"; colorpicker("profile.php?setcolor=1&modcolor=text_color&hexcolor="); echo "

"; break; case "link_color": echo "
Link color"; colorpicker("profile.php?setcolor=1&modcolor=link_color&hexcolor="); echo "

"; break; case "vlink_color": echo "
Visited link color"; colorpicker("profile.php?setcolor=1&modcolor=vlink_color&hexcolor="); echo "

"; break; case "heading_color": echo "
Heading color"; colorpicker("profile.php?setcolor=1&modcolor=heading_color&hexcolor="); echo "

"; break; } echo " Select the color you'd like to change

Page background color$curbgc
Sidebar color$cursbc
Menu background color$curmbgc
Normal text color$curtc
Link color$curlc
Visited link color$curvlc
Heading color$curhc



"; pageblock("right","end"); pagetable("end"); framework("end","","",$print); ?>