Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Custom Form

Asked Modified Viewed 1,338 times
D
diesltek710
D
  • Junior Member, joined since
  • Contributed 39 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
asked
Junior Member

Hi all, Im on a tight deadline been trying to figure this out for over a week now with no luck! I have the tables made for the form under "user_" and i have populated some for test purposes. I built a page that displays all my results fine. but my problem comes to when i or a user needs to add / update the data in the table.. I am on a super tight deadline atm since now im a day away from the due date for the project. and it will cost me a lot including future use of fusion...

I have also included a screenshot of what the results page looks like showing you that i got it working besides the acutal form to input the data....

this is the html for the form i am trying to build so that it would post the information into the correct table fields but my numerous tries have all come to fail. ive given up on custom user fields as i kinda need more than that. and a one page form would get the job done. i have been messing around with the php but cant get it to post. please see below for my html code, (i will try and post what i have for php code when i get a ver worth posting... but im not familiar with mysqli or pdo) been a member since v5/v6 trying to comprehend all this new stuff in such a short timeframe is not do able... Im asking please for someone to help out with the php/mysql portion of this form. ive also included the db table / names of the fields that each go too. this is also my first time using multiple check boxes to populate a table field.) im willing to offer $ for this support as long as its reasonable / able to be completed for testing tomorrow 10/19/22..

I have tried to use other pages / infusions as a refrence (thats how i built my results page for this form) but have been failing at doing it for the data input side of this...

html code:

<div class='' align='center'>
 <h1>Stats for Eden</h1>
 </div>
 <form class='' name='test' method='post' action='".FUSION_SELF."' enctype='multipart/form-data''

 target='_self'><br>
 <div class='' align='center'> <label for='availability' class=''>Select
 Available Times<span class='tooltip' tooltip='Check the times your available for battle'>
 </span></label>'
 <ul id='availability'>
 <li><input name='reset' value='yes' type='checkbox'>Reset</li>
 <li><input name='6' value='yes' type='checkbox'>+6</li>
 <li><input name='8' value='yes' type='checkbox'>+8</li>
 <li><input name='12' value='yes' type='checkbox'>+12</li>
 <li><input name='16' value='yes' type='checkbox'>+16</li>
 <li><input name='18' value='yes' type='checkbox'>+18</li>
 <li><input name='23' value='yes' type='checkbox'>+23</li>
 </ul>
 </div>
 <div class='' align='center'><label for='footmen' class=''>Footmen<span class='tooltip-element'

 tooltip='highest level footmen'> </span></label>
 <select class='form' name='footmen' id='footmen' required='required' aria-required='true'>
 <option disabled='null' selected='null'>-</option>
 <option value='7' id='footmen'>T7</option>
 <option value='8' id='footmen'>T8</option>
 <option value='9' id='footmen'>T9</option>
 <option value='10' id='footmen'>T10</option>
 </select>
 <label for='archers' class=''>Archers<span class='tooltip' tooltip='highest level archers'></span>
 </label>
 <select class='form' name='footmen' id='footmen' required='required' aria-required='true'>
 <option disabled='null' selected='null'>-</option>
 <option value='7' id='archers'>T7</option>
 <option value='8' id='archers'>T8</option>
 <option value='9' id='archers'>T9</option>
 <option value='10' id='archers'>T10</option>
 </select>
 <label for='archers' class=''>Calvary <span class='tooltip-element' tooltip='highest level calvary'></span>
 </label>
 <select class='form' name='calvary' id='calvary' required='required' aria-required='true'>
 <option disabled='null' selected='null'>-</option>
 <option value='7' id='calvary'>T7</option>
 <option value='8' id='calvary'>T8</option>
 <option value='9' id='calvary'>T9</option>
 <option value='10' id='calvary'>T10</option>
 </select>
 </div>
 <div class='' align='center'><br>
 </div>
 <div class='' align='center'> <label for='loyalty' class=''>Loyalty Level
 <span class='tooltip' tooltip='EDEN Loyalty'>
 </span></label>
 <input placeholder='0' class='form' name='loyalty' value='0' id='number-loyalty' title='eden loyalty level' required='required' form='stat_update' min='0' max='30000' type='number'> </div>
 <div class='' align='center'> <input name='submit' form='test' formaction='submit-form-db' formmethod='post' formtarget='_self' type='submit'>
 <input name='reset' type='reset'>
 </div> </form>


database:
user_loyalty int(5) UNSIGNED NOT NULL,
 user_cavs int(2) UNSIGNED NOT NULL,
 user_foot int(2) UNSIGNED NOT NULL,
 user_archer int(2) UNSIGNED NOT NULL,
 user_reset varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
 user_6 varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
 user_8 varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
 user_12 varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
 user_16 varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
 user_18 varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
 user_23 varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,


my current php code:
<?php
require_once "maincore.php";
require_once "subheader.php";

if (iMEMBER) {
   
   $data = dbarray($result);
   $result = dbquery("UPDATE ".$db_prefix."users (user_loyalty, user_cavs, user_foot, user_archer, user_reset, user_6, user_8, user_12, user_16, user_18, user_23")
   
   $loyalty = isset($_POST['user_loyalty']) ? stripinput(trim($_POST['user_loyalty'])) : "";
   $cavs = isset($_POST['user_cavs']) ? stripinput(trim($_POST['user_cavs'])) : "";
   $foot = isset($_POST['user_foot']) ? stripinput(trim($_POST['user_foot'])) : "";
   $archer = isset($_POST['user_archer']) ? stripinput(trim($_POST['user_archer'])) : "";
   //availability match check boxes with table
   $reset = isset($_POST['user_reset']) ? stripinput(trim($_POST['user_reset'])) : "";
   $reset6 = isset($_POST['user_6']) ? stripinput(trim($_POST['user_6'])) : "";
   $reset8 = isset($_POST['user_8']) ? stripinput(trim($_POST['user_8'])) : "";
   $reset12 = isset($_POST['user_12']) ? stripinput(trim($_POST['user_12'])) : "";
   $reset16 = isset($_POST['user_16']) ? stripinput(trim($_POST['user_16'])) : "";
   $reset18 = isset($_POST['user_18']) ? stripinput(trim($_POST['user_18'])) : "";
   $reset23 = isset($_POST['user_23']) ? stripinput(trim($_POST['user_23'])) : "";
   
   
 echo "<div class='' align='center'>
 <h1>Stats for Eden</h1>
 </div>
 <form class='' name='test' method='post' action='".FUSION_SELF."' enctype='multipart/form-data''

 target='_self'><br>
 <div class='' align='center'> <label for='availability' class=''>Select
 Available Times<span class='tooltip' tooltip='Check the times your available for battle'>
 </span></label>'
 <ul id='availability'>
 <li><input name='reset' value='yes' type='checkbox'>Reset</li>
 <li><input name='6' value='yes' type='checkbox'>+6</li>
 <li><input name='8' value='yes' type='checkbox'>+8</li>
 <li><input name='12' value='yes' type='checkbox'>+12</li>
 <li><input name='16' value='yes' type='checkbox'>+16</li>
 <li><input name='18' value='yes' type='checkbox'>+18</li>
 <li><input name='23' value='yes' type='checkbox'>+23</li>
 </ul>
 </div>
 <div class='' align='center'><label for='footmen' class=''>Footmen<span class='tooltip-element'

 tooltip='highest level footmen'> </span></label>
 <select class='form' name='footmen' id='footmen' required='required' aria-required='true'>
 <option disabled='null' selected='null'>-</option>
 <option value='7' id='footmen'>T7</option>
 <option value='8' id='footmen'>T8</option>
 <option value='9' id='footmen'>T9</option>
 <option value='10' id='footmen'>T10</option>
 </select>
 <label for='archers' class=''>Archers<span class='tooltip' tooltip='highest level archers'></span>
 </label>
 <select class='form' name='footmen' id='footmen' required='required' aria-required='true'>
 <option disabled='null' selected='null'>-</option>
 <option value='7' id='archers'>T7</option>
 <option value='8' id='archers'>T8</option>
 <option value='9' id='archers'>T9</option>
 <option value='10' id='archers'>T10</option>
 </select>
 <label for='archers' class=''>Calvary <span class='tooltip-element' tooltip='highest level calvary'></span>
 </label>
 <select class='form' name='calvary' id='calvary' required='required' aria-required='true'>
 <option disabled='null' selected='null'>-</option>
 <option value='7' id='calvary'>T7</option>
 <option value='8' id='calvary'>T8</option>
 <option value='9' id='calvary'>T9</option>
 <option value='10' id='calvary'>T10</option>
 </select>
 </div>
 <div class='' align='center'><br>
 </div>
 <div class='' align='center'> <label for='loyalty' class=''>Loyalty Level
 <span class='tooltip' tooltip='EDEN Loyalty'>
 </span></label>
 <input placeholder='0' class='form' name='loyalty' value='0' id='number-loyalty' title='eden loyalty level' required='required' form='stat_update' min='0' max='30000' type='number'> </div>
 <div class='' align='center'> <input name='submit' form='test' formaction='submit-form-db' formmethod='post' formtarget='_self' type='submit'>
 <input name='reset' type='reset'>
 </div> </form>";

} else {
 redirect("index.php");
}
require_once "footer.php"
?>
Edited by diesltek710 on 19-10-2022 19:47,
diesltek710 attached the following image:
Image not found
0 replies

16 posts

D
diesltek710
D
  • Junior Member, joined since
  • Contributed 39 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
answered
Junior Member

Anyone $$ willing to pay
0 replies
D
douwe_yntema
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
answered
Senior Member

Add someting like this on top of file:

if (isset($_POST['submit']){

$result = dbquery("INSERT INTO tour database.....
}
0 replies
D
diesltek710
D
  • Junior Member, joined since
  • Contributed 39 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
answered
Junior Member

I have tried to add the if (isset($post... and im getting an error of "unexpected ; in line 9"....

this is my latest code

<?php
   require_once __DIR__."/maincore.php";
   require_once THEMES."templates/header.php";
   
   add_to_title('Eden Form');
   
   if (isset($_POST['submit'] {
   
   
   $result = dbquery("UPDATE ".$db_prefix."users (user_loyalty, user_cavs, user_foot, user_archer, user_reset, user_6, user_8, user_12, user_16, user_18, user_23")
   $data = dbarray($result)
   $loyalty = isset($_POST['user_loyalty']) ? stripinput(trim($_POST['user_loyalty'])) : "";
   $cavs = isset($_POST['user_cavs']) ? stripinput(trim($_POST['user_cavs'])) : "";
   $foot = isset($_POST['user_foot']) ? stripinput(trim($_POST['user_foot'])) : "";
   $archer = isset($_POST['user_archer']) ? stripinput(trim($_POST['user_archer'])) : "";
   //availability match check boxes with table
   $reset = isset($_POST['user_reset']) ? stripinput(trim($_POST['user_reset'])) : "";
   $reset6 = isset($_POST['user_6']) ? stripinput(trim($_POST['user_6'])) : "";
   $reset8 = isset($_POST['user_8']) ? stripinput(trim($_POST['user_8'])) : "";
   $reset12 = isset($_POST['user_12']) ? stripinput(trim($_POST['user_12'])) : "";
   $reset16 = isset($_POST['user_16']) ? stripinput(trim($_POST['user_16'])) : "";
   $reset18 = isset($_POST['user_18']) ? stripinput(trim($_POST['user_18'])) : "";
   $reset23 = isset($_POST['user_23']) ? stripinput(trim($_POST['user_23'])) : "";
   
   
 echo "<div class='' align='center'>
 <h1>Stats for Eden</h1>
 </div>
 <form class='' name='eden' method='post' action='".FUSION_SELF."' enctype='multipart/form-data''

 target='_self'><br>
 <div class='' align='center'> <label for='availability' class=''>Select
 Available Times<span class='tooltip' tooltip='Check the times your available for battle'>
 </span></label>'
 <ul id='availability'>
 <li><input name='user_reset' value='Yes' type='checkbox'>Reset</li>
 <li><input name='user_6' value='Yes' type='checkbox'>+6</li>
 <li><input name='user_8' value='Yes' type='checkbox'>+8</li>
 <li><input name='user_12' value='Yes' type='checkbox'>+12</li>
 <li><input name='user_16' value='Yes' type='checkbox'>+16</li>
 <li><input name='user_18' value='Yes' type='checkbox'>+18</li>
 <li><input name='user_23' value='Yes' type='checkbox'>+23</li>
 </ul>
 </div>
 <div class='' align='center'><label for='footmen' class=''>Footmen<span class='tooltip-element'

 tooltip='highest level footmen'> </span></label>
 <select class='form' name='user_foot' id='user_foot' required='required' aria-required='true'>
 <option disabled='null' selected='".$user_data['user_foot']."'>-</option>
 <option value='7' id='footmen'>T7</option>
 <option value='8' id='footmen'>T8</option>
 <option value='9' id='footmen'>T9</option>
 <option value='10' id='footmen'>T10</option>
 </select>
 <label for='archers' class=''>Archers<span class='tooltip' tooltip='highest level archers'></span>
 </label>
 <select class='form' name='user_archer' id='user_archer' required='required' aria-required='true'>
 <option disabled='null' selected='".$user_data['user_archer']."'>-</option>
 <option value='7' id='archers'>T7</option>
 <option value='8' id='archers'>T8</option>
 <option value='9' id='archers'>T9</option>
 <option value='10' id='archers'>T10</option>
 </select>
 <label for='archers' class=''>Calvary <span class='tooltip-element' tooltip='highest level calvary'></span>
 </label>
 <select class='form' name='user_cavs' id='user_cavs' required='required' aria-required='true'>
 <option disabled='null' selected='".$user_data['user_cavs']."'>-</option>
 <option value='7' id='calvary'>T7</option>
 <option value='8' id='calvary'>T8</option>
 <option value='9' id='calvary'>T9</option>
 <option value='10' id='calvary'>T10</option>
 </select>
 </div>
 <div class='' align='center'><br>
 </div>
 <div class='' align='center'> <label for='loyalty' class=''>Loyalty Level
 <span class='tooltip' tooltip='EDEN Loyalty'>
 </span></label>
 <input placeholder='0' class='form' name='user_loyalty' value='".$user_data['user_loyalty']."' id='user_loyalty' title='eden loyalty level' required='required' form='eden' min='0' max='30000' type='number'> </div>
 <div class='' align='center'> <input name='submit' form='eden' formmethod='post' formtarget='stats.php' type='submit'>
 <input name='reset' type='reset'>
 </div> </form>";
   }
   
require_once THEMES."templates/footer.php";
?>
0 replies
D
douwe_yntema
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
answered
Senior Member

Missing 2 times a ) on the that line

And you must place the code just above the line where you make the form, so just before the echo

Before testing your code please do a syntax check here:

https://www.piliapp.com/php-syntax-check/
Edited by douwe_yntema on 20-10-2022 08:10,
0 replies
D
diesltek710
D
  • Junior Member, joined since
  • Contributed 39 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
answered
Junior Member

when i add that ) i get "Parse error: syntax error, unexpected ')' in line 10"

when i do it single i get "Parse error: syntax error, unexpected '$data' (T_VARIABLE) in line 12" and thats what the syntax checker says too..

<?php
   require_once __DIR__."/maincore.php";
   require_once THEMES."templates/header.php";
   
   add_to_title('Eden Form');

   if (isset($_POST['submit'] {
   
   
   $result = dbquery("UPDATE ".DB_USERS." (user_loyalty, user_cavs, user_foot, user_archer, user_reset, user_6, user_8, user_12, user_16, user_18, user_23")
   
   $data = dbarray($result)
   
   $loyalty = isset($_POST['user_loyalty']) ? stripinput(trim($_POST['user_loyalty'])) : "";
   $cavs = isset($_POST['user_cavs']) ? stripinput(trim($_POST['user_cavs'])) : "";
   $foot = isset($_POST['user_foot']) ? stripinput(trim($_POST['user_foot'])) : "";
   $archer = isset($_POST['user_archer']) ? stripinput(trim($_POST['user_archer'])) : "";
   //availability match check boxes with table
   $reset = isset($_POST['user_reset']) ? stripinput(trim($_POST['user_reset'])) : "";
   $reset6 = isset($_POST['user_6']) ? stripinput(trim($_POST['user_6'])) : "";
   $reset8 = isset($_POST['user_8']) ? stripinput(trim($_POST['user_8'])) : "";
   $reset12 = isset($_POST['user_12']) ? stripinput(trim($_POST['user_12'])) : "";
   $reset16 = isset($_POST['user_16']) ? stripinput(trim($_POST['user_16'])) : "";
   $reset18 = isset($_POST['user_18']) ? stripinput(trim($_POST['user_18'])) : "";
   $reset23 = isset($_POST['user_23']) ? stripinput(trim($_POST['user_23'])) : "";
   
   
 echo"<div class='' align='center'>
 <h1>Stats for Eden</h1>
 </div>
 <form class='' name='eden' method='post' action='".FUSION_SELF."' enctype='multipart/form-data''

 target='_self'><br>
 <div class='' align='center'> <label for='availability' class=''>Select
 Available Times<span class='tooltip' tooltip='Check the times your available for battle'>
 </span></label>'
 <ul id='availability'>
 <li><input name='user_reset' value='Yes' type='checkbox'>Reset
 <input name='user_6' value='Yes' type='checkbox'>+6
 <input name='user_8' value='Yes' type='checkbox'>+8
 <input name='user_12' value='Yes' type='checkbox'>+12</li>
 <li><input name='user_16' value='Yes' type='checkbox'>+16
 <input name='user_18' value='Yes' type='checkbox'>+18
 <input name='user_23' value='Yes' type='checkbox'>+23</li>
 </ul>
 </div>
 <div class='' align='center'><label for='footmen' class=''>Footmen<span class='tooltip-element'

 tooltip='highest level footmen'> </span></label>
 <select class='form' name='user_foot' id='user_foot' required='required' aria-required='true'>
 <option disabled='null' selected='".$user_data['user_foot']."'>-</option>
 <option value='7' id='footmen'>T7</option>
 <option value='8' id='footmen'>T8</option>
 <option value='9' id='footmen'>T9</option>
 <option value='10' id='footmen'>T10</option>
 </select>
 <label for='archers' class=''>Archers<span class='tooltip' tooltip='highest level archers'></span>
 </label>
 <select class='form' name='user_archer' id='user_archer' required='required' aria-required='true'>
 <option disabled='null' selected='".$user_data['user_archer']."'>-</option>
 <option value='7' id='archers'>T7</option>
 <option value='8' id='archers'>T8</option>
 <option value='9' id='archers'>T9</option>
 <option value='10' id='archers'>T10</option>
 </select>
 <label for='archers' class=''>Calvary <span class='tooltip-element' tooltip='highest level calvary'></span>
 </label>
 <select class='form' name='user_cavs' id='user_cavs' required='required' aria-required='true'>
 <option disabled='null' selected='".$user_data['user_cavs']."'>-</option>
 <option value='7' id='calvary'>T7</option>
 <option value='8' id='calvary'>T8</option>
 <option value='9' id='calvary'>T9</option>
 <option value='10' id='calvary'>T10</option>
 </select>
 </div>
 <div class='' align='center'><br>
 </div>
 <div class='' align='center'> <label for='loyalty' class=''>Loyalty Level
 <span class='tooltip' tooltip='EDEN Loyalty'>
 </span></label>
 <input placeholder='0' class='form' name='user_loyalty' value='".$user_data['user_loyalty']."' id='user_loyalty' title='eden loyalty level' required='required' form='eden' min='0' max='30000' type='number'> </div>
 <div class='' align='center'>
    <input class='button' name='submit' form='eden' formmethod='post' formtarget='_self' type='submit'>
 <input name='reset' type='reset'>
 </div> </form>";
   }
   
require_once THEMES."templates/footer.php";
?>
Edited by diesltek710 on 20-10-2022 09:57,
0 replies
D
douwe_yntema
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
answered
Senior Member

There is also a missing } at the end of the if. And for sure you need double )
0 replies
K
karrak
K
karrak 32
Van mi sosem változik..smile
  • Senior Member, joined since
  • Contributed 310 posts on the community forums.
  • Started 94 threads in the forums
  • Answered 1 question
answered
Senior Member

just a test
<?php
require_once "../../maincore.php";
require_once THEMES."templates/header.php";

 add_to_title('Eden Form');

 if (isset($_POST['submit'])) {
 $loyalty = isset($_POST['user_loyalty']) ? stripinput(trim($_POST['user_loyalty'])) : "";
 $cavs = isset($_POST['user_cavs']) ? stripinput(trim($_POST['user_cavs'])) : "";
 $foot = isset($_POST['user_foot']) ? stripinput(trim($_POST['user_foot'])) : "";
 $archer = isset($_POST['user_archer']) ? stripinput(trim($_POST['user_archer'])) : "";
 //availability match check boxes with table
 $reset = isset($_POST['user_reset']) ? stripinput(trim($_POST['user_reset'])) : "";
 $user_6 = isset($_POST['user_6']) ? stripinput(trim($_POST['user_6'])) : "";
 $user_8 = isset($_POST['user_8']) ? stripinput(trim($_POST['user_8'])) : "";
 $user_12 = isset($_POST['user_12']) ? stripinput(trim($_POST['user_12'])) : "";
 $user_16 = isset($_POST['user_16']) ? stripinput(trim($_POST['user_16'])) : "";
 $user_18 = isset($_POST['user_18']) ? stripinput(trim($_POST['user_18'])) : "";
 $user_23 = isset($_POST['user_23']) ? stripinput(trim($_POST['user_23'])) : "";

   $result = dbquery("UPDATE ".DB_USERS." SET user_loyalty='".$loyalty."', user_cavs='".$cavs."', user_foot='".$foot."', user_archer='".$archer."', user_reset='".$reset."' user_6='".$user_6."', user_8='".$user_8."', user_12='".$user_12."', user_16='".$user_16."', user_18='".$user_18."', user_23='".$user_23."' WHERE user_id='".$userdata['user_id']."'");
   redirect(FUSION_SELF);

 }



 echo "<div class='' align='center'>
 <h1>Stats for Eden</h1>
 </div>
 <form class='' name='eden' method='post' action='".FUSION_SELF."' enctype='multipart/form-data''

 target='_self'><br>
 <div class='' align='center'> <label for='availability' class=''>Select
 Available Times<span class='tooltip' tooltip='Check the times your available for battle'>
 </span></label>'
 <ul id='availability'>
 <li><input name='user_reset' value='Yes' type='checkbox'>Reset</li>
 <li><input name='user_6' value='Yes' type='checkbox'>+6</li>
 <li><input name='user_8' value='Yes' type='checkbox'>+8</li>
 <li><input name='user_12' value='Yes' type='checkbox'>+12</li>
 <li><input name='user_16' value='Yes' type='checkbox'>+16</li>
 <li><input name='user_18' value='Yes' type='checkbox'>+18</li>
 <li><input name='user_23' value='Yes' type='checkbox'>+23</li>
 </ul>
 </div>
 <div class='' align='center'><label for='footmen' class=''>Footmen<span class='tooltip-element'

 tooltip='highest level footmen'> </span></label>
 <select class='form' name='user_foot' id='user_foot' required='required' aria-required='true'>
 <option disabled='null' selected='".$userdata['user_foot']."'>-</option>
 <option value='7' id='footmen'>T7</option>
 <option value='8' id='footmen'>T8</option>
 <option value='9' id='footmen'>T9</option>
 <option value='10' id='footmen'>T10</option>
 </select>
 <label for='archers' class=''>Archers<span class='tooltip' tooltip='highest level archers'></span>
 </label>
 <select class='form' name='user_archer' id='user_archer' required='required' aria-required='true'>
 <option disabled='null' selected='".$userdata['user_archer']."'>-</option>
 <option value='7' id='archers'>T7</option>
 <option value='8' id='archers'>T8</option>
 <option value='9' id='archers'>T9</option>
 <option value='10' id='archers'>T10</option>
 </select>
 <label for='archers' class=''>Calvary <span class='tooltip-element' tooltip='highest level calvary'></span>
 </label>
 <select class='form' name='user_cavs' id='user_cavs' required='required' aria-required='true'>
 <option disabled='null' selected='".$userdata['user_cavs']."'>-</option>
 <option value='7' id='calvary'>T7</option>
 <option value='8' id='calvary'>T8</option>
 <option value='9' id='calvary'>T9</option>
 <option value='10' id='calvary'>T10</option>
 </select>
 </div>
 <div class='' align='center'><br>
 </div>
 <div class='' align='center'> <label for='loyalty' class=''>Loyalty Level
 <span class='tooltip' tooltip='EDEN Loyalty'>
 </span></label>
 <input placeholder='0' class='form' name='user_loyalty' value='".$userdata['user_loyalty']."' id='user_loyalty' title='eden loyalty level' required='required' form='eden' min='0' max='30000' type='number'> </div>
 <div class='' align='center'> <input name='submit' form='eden' formmethod='post' formtarget='stats.php' type='submit'>
 <input name='reset' type='reset'>
 </div> </form>";


require_once THEMES."templates/footer.php";
?>
Edited by karrak on 20-10-2022 17:12,
0 replies
D
diesltek710
D
  • Junior Member, joined since
  • Contributed 39 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
answered
Junior Member

Well now im not getting any errors and can see my form. but the form data from the table isnt populating, nor is anything happening when i click submit.
0 replies
D
douwe_yntema
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
answered
Senior Member

Because there is no insert command, only an update of existing data
1 reply
D
diesltek710
D
  • Junior Member, joined since
  • Contributed 39 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
answered
Junior Member

Thanks so i changed a few things in the code to have it properly populate the fields, but the submit button still dosnt work. and im not sure how i can get the check boxes to populate from the data base.

example for check box. if db = yes then check box is checked. if db = no/no value then check box is unchecked

latest code -

<?php
require_once "maincore.php";
require_once THEMES."templates/header.php";

 add_to_title('Eden Form');

 if (isset($_POST['submit'])) {
 $loyalty = isset($_POST['user_loyalty']) ? stripinput(trim($_POST['user_loyalty'])) : "";
 $cavs = isset($_POST['user_cavs']) ? stripinput(trim($_POST['user_cavs'])) : "";
 $foot = isset($_POST['user_foot']) ? stripinput(trim($_POST['user_foot'])) : "";
 $archer = isset($_POST['user_archer']) ? stripinput(trim($_POST['user_archer'])) : "";
 //availability match check boxes with table
 $reset = isset($_POST['user_reset']) ? stripinput(trim($_POST['user_reset'])) : "";
 $user_6 = isset($_POST['user_6']) ? stripinput(trim($_POST['user_6'])) : "";
 $user_8 = isset($_POST['user_8']) ? stripinput(trim($_POST['user_8'])) : "";
 $user_12 = isset($_POST['user_12']) ? stripinput(trim($_POST['user_12'])) : "";
 $user_16 = isset($_POST['user_16']) ? stripinput(trim($_POST['user_16'])) : "";
 $user_18 = isset($_POST['user_18']) ? stripinput(trim($_POST['user_18'])) : "";
 $user_23 = isset($_POST['user_23']) ? stripinput(trim($_POST['user_23'])) : "";

 $result = dbquery("UPDATE ".DB_USERS." SET user_loyalty='".$loyalty."', user_cavs='".$cavs."', user_foot='".$foot."', user_archer='".$archer."', user_reset='".$reset."' user_6='".$user_6."', user_8='".$user_8."', user_12='".$user_12."', user_16='".$user_16."', user_18='".$user_18."', user_23='".$user_23."' WHERE user_id='".$userdata['user_id']."'");
 redirect(FUSION_SELF);

 }



 echo "<div class='' align='center'>
 <h1>Stats for Eden</h1>
 </div>
 <form class='' name='eden' method='post' action='".FUSION_SELF."' enctype='multipart/form-data' target='_self'><br>
 <div class='' align='center'> <label for='availability' class=''>Select
 Available Times<span class='tooltip' tooltip='Check the times your available for battle'>
 </span></label>'
 <ul id='availability'>
 <li><input name='user_reset' value='Yes' type='checkbox'>Reset
 <input name='user_6' value='Yes' type='checkbox'>+6
 <input name='user_8' value='Yes' type='checkbox'>+8
<input name='user_12' value='Yes' type='checkbox'>+12</li>
 <li><input name='user_16' value='Yes' type='checkbox'>+16
 <input name='user_18' value='Yes' type='checkbox'>+18
<input name='user_23' value='Yes' type='checkbox'>+23</li>
 </ul>
 </div>
 <div class='' align='center'><label for='footmen' class=''>Footmen<span class='tooltip-element'

 tooltip='highest level footmen'> </span></label>
 <select class='form' name='user_foot' id='user_foot' required='required' aria-required='true'>
 <option value='".$userdata['user_foot']."' id='archers'>".$userdata['user_foot']."</option>
 <option value='T7' id='footmen'>T7</option>
 <option value='T8' id='footmen'>T8</option>
 <option value='T9' id='footmen'>T9</option>
 <option value='T10' id='footmen'>T10</option>
 </select>
 <label for='archers' class=''>Archers<span class='tooltip' tooltip='highest level archers'></span>
 </label>
 <select class='form' name='user_archer' id='user_archer' required='required' aria-required='true'>
 <option value='".$userdata['user_archer']."' id='archers'>".$userdata['user_archer']."</option>
 <option value='T7' id='archers'>T7</option>
 <option value='T8' id='archers'>T8</option>
 <option value='T9' id='archers'>T9</option>
 <option value='T10' id='archers'>T10</option>
 </select>
 <label for='archers' class=''>Calvary <span class='tooltip-element' tooltip='highest level calvary'></span>
 </label>
 <select class='form' name='user_cavs' id='user_cavs' required='required' aria-required='true'>
 <option value='".$userdata['user_cavs']."' id='archers'>".$userdata['user_cavs']."</option>
 <option value='T7' id='calvary'>T7</option>
 <option value='T8' id='calvary'>T8</option>
 <option value='T9' id='calvary'>T9</option>
 <option value='T10' id='calvary'>T10</option>
 </select>
 </div>
 <div class='' align='center'><br>
 </div>
 <div class='' align='center'> <label for='loyalty' class=''>Loyalty Level
 <span class='tooltip' tooltip='EDEN Loyalty'>
 </span></label>
 <input placeholder='0' class='form' name='user_loyalty' value='".$userdata['user_loyalty']."' id='user_loyalty' title='eden loyalty level' required='required' form='eden' min='0' max='30000' type='number'> </div>
 <div class='' align='center'>
 <input name='submit' form='eden' formmethod='post' formtarget='".FUSION_SELF."' type='submit'>
 <input name='reset' type='reset'>
 </div> </form>";


require_once THEMES."templates/footer.php";
?>
0 replies
M
MathiasHU
M
https://fusion.bltfm.hu/
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 3 threads in the forums
  • Answered 1 question
answered
Junior Member

user_loyalty int(5) NOT NULL,
 user_cavs text COLLATE utf8mb4_unicode_ci NOT NULL,
 user_foot text COLLATE utf8mb4_unicode_ci NOT NULL,
 user_archer text COLLATE utf8mb4_unicode_ci NOT NULL,
 user_reset int(1) NOT NULL DEFAULT 0,
 user_6 int(1) NOT NULL DEFAULT 0,
 user_8 int(1) NOT NULL DEFAULT 0,
 user_12 int(1) NOT NULL DEFAULT 0,
 user_16 int(1) NOT NULL DEFAULT 0,
 user_18 int(1) NOT NULL DEFAULT 0,
 user_23 int(1) NOT NULL DEFAULT 0


if (isset($_POST['loyalty_save'])) {

   $loyalty = isset($_POST['user_loyalty']) && isnum($_POST['user_loyalty']) ? $_POST['user_loyalty'] : 0;
   $cavs = isset($_POST['user_cavs']) && stripinput($_POST['user_cavs']) ? $_POST['user_cavs'] : 0;
   $foot = isset($_POST['user_foot']) && stripinput($_POST['user_foot']) ? $_POST['user_foot'] : 0;
   $archer = isset($_POST['user_archer']) && stripinput($_POST['user_archer']) ? $_POST['user_archer'] : 0;

 //availability match check boxes with table
   $reset = isset($_POST['user_reset']) && isnum($_POST['user_reset']) ? $_POST['user_reset'] : 0;
   $user_6 = isset($_POST['user_6']) && isnum($_POST['user_6']) ? $_POST['user_6'] : 0;
   $user_8 = isset($_POST['user_8']) && isnum($_POST['user_8']) ? $_POST['user_8'] : 0;
   $user_12 = isset($_POST['user_12']) && isnum($_POST['user_12']) ? $_POST['user_12'] : 0;
   $user_16 = isset($_POST['user_16']) && isnum($_POST['user_16']) ? $_POST['user_16'] : 0;
   $user_18 = isset($_POST['user_18']) && isnum($_POST['user_18']) ? $_POST['user_18'] : 0;
   $user_23 = isset($_POST['user_23']) && isnum($_POST['user_23']) ? $_POST['user_23'] : 0;


   $result = dbquery("UPDATE ".DB_USERS." SET user_loyalty='".$loyalty."', user_cavs='".$cavs."', user_foot='".$foot."', user_archer='".$archer."', user_reset='".$reset."', user_6='".$user_6."', user_8='".$user_8."', user_12='".$user_12."', user_16='".$user_16."', user_18='".$user_18."', user_23='".$user_23."' WHERE user_id='".$userdata['user_id']."'");

   redirect(FUSION_SELF);

} else if (isset($_POST['loyalty_reset'])) {
   $result = dbquery("UPDATE ".DB_USERS." SET user_loyalty='0', user_cavs='0', user_foot='0', user_archer='0', user_reset='0', user_6='0', user_8='0', user_12='0', user_16='0', user_18='0', user_23='0' WHERE user_id='".$userdata['user_id']."'");
   redirect(FUSION_SELF);
}



 echo "<div class='' align='center'>
 <h1>Stats for Eden</h1>
 </div><form method='post' action='".FUSION_SELF."'><br>
 <div class='' align='center'> <label for='availability' class=''>Select
 Available Times<span class='tooltip' tooltip='Check the times your available for battle'>
 </span></label>
 <ul id='availability'>
 <li>
 <label><input type='checkbox' name='user_reset' value='1'".($userdata['user_reset'] == 1 ? " checked='checked'" : "")." />Reset</label>n
<label><input type='checkbox' name='user_6' value='1'".($userdata['user_6'] == 1 ? " checked='checked'" : "")." />+6</label>n
<label><input type='checkbox' name='user_8' value='1'".($userdata['user_8'] == 1 ? " checked='checked'" : "")." />+8</label>n
<label><input type='checkbox' name='user_12' value='1'".($userdata['user_12'] == 1 ? " checked='checked'" : "")." />+12</label>n
</li>

<li>
 <label><input type='checkbox' name='user_16' value='1'".($userdata['user_16'] == 1 ? " checked='checked'" : "")." />+16</label>n
<label><input type='checkbox' name='user_18' value='1'".($userdata['user_18'] == 1 ? " checked='checked'" : "")." />+8</label>n
<label><input type='checkbox' name='user_23' value='1'".($userdata['user_23'] == 1 ? " checked='checked'" : "")." />+23</label>n
</li>

 </ul>
 </div>
 <div class='' align='center'><label for='footmen' class=''>Footmen<span class='tooltip-element'

 tooltip='highest level footmen'> </span></label>
 <select class='form' name='user_foot' id='user_foot' required='required' aria-required='true'>
 <option value='0'".($userdata['user_foot'] == "0" ? " selected='selected'" : "").">0</option>
 <option value='T7'".($userdata['user_foot'] == "T7" ? " selected='selected'" : "").">T7</option>
 <option value='T8'".($userdata['user_foot'] == "T8" ? " selected='selected'" : "").">T8</option>
 <option value='T9'".($userdata['user_foot'] == "T9" ? " selected='selected'" : "").">T9</option>
 <option value='T10'".($userdata['user_foot'] == "T10" ? " selected='selected'" : "").">T10</option>
</select>


 <label for='archers' class=''>Archers<span class='tooltip' tooltip='highest level archers'></span>
 </label>
 <select class='form' name='user_archer' id='user_archer' required='required' aria-required='true'>
 <option value='0'".($userdata['user_archer'] == "0" ? " selected='selected'" : "").">0</option>
 <option value='T7'".($userdata['user_archer'] == "T7" ? " selected='selected'" : "").">T7</option>
 <option value='T8'".($userdata['user_archer'] == "T8" ? " selected='selected'" : "").">T8</option>
 <option value='T9'".($userdata['user_archer'] == "T9" ? " selected='selected'" : "").">T9</option>
 <option value='T10'".($userdata['user_archer'] == "T10" ? " selected='selected'" : "").">T10</option>
 </select>
 <label for='archers' class=''>Calvary <span class='tooltip-element' tooltip='highest level calvary'></span>
 </label>
 <select class='form' name='user_cavs' id='user_cavs' required='required' aria-required='true'>
 <option value='0'".($userdata['user_cavs'] == "0" ? " selected='selected'" : "").">0</option>
 <option value='T7'".($userdata['user_cavs'] == "T7" ? " selected='selected'" : "").">T7</option>
 <option value='T8'".($userdata['user_cavs'] == "T8" ? " selected='selected'" : "").">T8</option>
 <option value='T9'".($userdata['user_cavs'] == "T9" ? " selected='selected'" : "").">T9</option>
 <option value='T10'".($userdata['user_cavs'] == "T10" ? " selected='selected'" : "").">T10</option>
 </select>
 </div>
 <div class='' align='center'><br>
 </div>
 <div class='' align='center'> <label for='loyalty' class=''>Loyalty Level
 <span class='tooltip' tooltip='EDEN Loyalty'>
 </span></label>

 <input type='number' id='user_loyalty' name='user_loyalty' maxlength='1' min='0' max='30000' class='textbox' value='".$userdata['user_loyalty']."' required='required' style='width:200px;' /> </div>
 <div class='' align='center'>
 <input type='submit' name='loyalty_save' value='Save' class='button' />
 <input type='submit' name='loyalty_reset' value='Reset' class='button' />
 
 </div></form>";
1 reply
M
MathiasHU
M
https://fusion.bltfm.hu/
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 3 threads in the forums
  • Answered 1 question
answered
Junior Member

I just installed a v8 for you.
It has been tested and save database.

https://v8.bltfm.hu/infusions/user_lo...submit.php

Log in, I sent you the details in a private message
0 replies
D
diesltek710
D
  • Junior Member, joined since
  • Contributed 39 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
answered
Junior Member

Hey not sure if i should make a new thread or not but this is related to the form...

So i made a results page that displays the forms data for each user but have 2 major questions and one minor one

Major - i havw the data displayed as i would like for the most part except for the times available. How can i convert the value of 0 / 1 to be No or Yes (through php rendering not through changing the data in the db)

Secondly i would like to have a total at the bottom that counts how many people are available at that time.

The way the results page looks is like this atm. And all i need to do is add a total amount of users, total amount of users available for each hour 'column'

The minor issue that I am having is as you can see in the screen shot that on mobile devices the table dosnt properly fit the screen.. Is there any way to better format this information so it looks presentable and dosnt break the page?

(sorry im not home atm once i get home i will post the code of what i have. It's built off from the members.php pages just have striped a lot added my lookups and made the results display all my users "100“ at a single time)

Thanks in advance. BTW glad this form worked out well even for ver9 as i have finally found a calendar that works with ver9 and i have this form as a template to build my other forms that i will need. ?
diesltek710 attached the following image:
Image not found
0 replies
D
diesltek710
D
  • Junior Member, joined since
  • Contributed 39 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
answered
Junior Member

here is the code that displays the form information.
<?php

require_once __DIR__."/maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."members.php";

add_to_title("Eden Stats");

opentable("Eden Stats");
if (iMEMBER) {
 if (!isset($_GET['sortby']) || !ctype_alnum($_GET['sortby'])) {
 $_GET['sortby'] = "all";
 }
 $orderby = ($_GET['sortby'] == "all" ? "" : " AND user_name LIKE '".stripinput($_GET['sortby'])."%'");
 $search_text = ((isset($_GET['search_text']) && preg_check("/^[-0-9A-Z_@S]+$/i", $_GET['search_text'])) ? $orderby = ' AND user_name LIKE "'.stripinput($_GET['search_text']).'%"' : $_GET['sortby']);
 $result = dbquery("SELECT user_id FROM ".DB_USERS." WHERE user_status='0'".$orderby);
 $rows = dbrows($result);
 if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) {
 $_GET['rowstart'] = 0;
 }
 if ($rows) {
 $i = 0;
 echo "<table cellpadding='0' cellspacing='0' width='100%'>n<tr>n";
 echo "<td align='center' class='tbl2'><strong>".$locale['401']."</strong></td>n";
 echo "<td class='tbl2'><strong>".$locale['405']."</strong></td>n";
 //echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><strong>".$locale['402']."</strong></td>n";
      echo "<td align='center' class='tbl2'><strong>Current Loyalty</strong></td>n";
      echo "<td align='center' class='tbl2'><strong>Calvery Level</strong></td>n";
      echo "<td align='center' class='tbl2'><strong>Footment Level</strong></td>n";
      echo "<td align='center' class='tbl2'><strong>Archer Level</strong></td>n";
      echo "<td align='center' class='tbl2'><strong>Reset</strong></td>n";
      echo "<td align='center' class='tbl2'><strong>+6</strong></td>n";
      echo "<td align='center' class='tbl2'><strong>+8</strong></td>n";
      echo "<td align='center' class='tbl2'><strong>+12</strong></td>n";
      echo "<td align='center' class='tbl2'><strong>+16</strong></td>n";
      echo "<td align='center' class='tbl2'><strong>+18</strong></td>n";
      echo "<td align='center' class='tbl2'><strong>+23</strong></td>n";
 echo "</tr>n";
 $result = dbquery("SELECT user_id, user_name, user_status, user_level, user_groups, user_loyalty, user_cavs, user_foot, user_archer, user_reset, user_6, user_8, user_12, user_16, user_18, user_23 FROM ".DB_USERS." WHERE user_status='0'".$orderby." ORDER BY user_level DESC, user_name LIMIT ".$_GET['rowstart'].",20");
 while ($data = dbarray($result)) {
 $cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2");
 $i++;
 echo "<tr>n<td class='$cell_color'>n".profile_link($data['user_id'], $data['user_name'], $data['user_status'])."</td>n";
 $groups = "";
 $user_groups = explode(".", $data['user_groups']);
 $j = 0;
 foreach ($user_groups as $key => $value) {
 if ($value) {
 $groups .= "<a href='profile.php?group_id=".$value."'>".getgroupname($value)."</a>".($j < count($user_groups) - 1 ? ", " : "");
 }
 $j++;
 }
 echo "<td class='$cell_color'>n".($groups ? $groups : ($data['user_level'] == 103 ? $locale['407'] : $locale['406']))."</td>n";
         echo "<td align='center' class='$cell_color'>n".$data['user_loyalty']."</td>n";
         echo "<td align='center' class='$cell_color'>n ".$data['user_cavs']."</td>n";
         echo "<td align='center' class='$cell_color'>n ".$data['user_foot']."</td>n";
         echo "<td align='center' class='$cell_color'>n ".$data['user_archer']."</td>n";
         echo "<td align='center' class='$cell_color'>n".$data['user_reset']."</td>n";
         echo "<td align='center' class='$cell_color'>n".$data['user_6']."</td>n";
         echo "<td align='center' class='$cell_color'>n".$data['user_8']."</td>n";
         echo "<td align='center' class='$cell_color'>n".$data['user_12']."</td>n";
         echo "<td align='center' class='$cell_color'>n".$data['user_16']."</td>n";
         echo "<td align='center' class='$cell_color'>n".$data['user_18']."</td>n";
         echo "<td align='center' class='$cell_color'>n".$data['user_23']."</td>n";
 //echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>".getuserlevel($data['user_level'])."</td>n</tr>";
 }
 echo "</table>n";
 } else {
 
 }
 echo "</tr>n</table>n";
} else {
 redirect("index.php");
}
closetable();
if ($rows > 100) {
 echo "<div align='center' style='margin-top:5px;'>".makepagenav($_GET['rowstart'], 100, $rows, 3, FUSION_SELF."?sortby=".$_GET['sortby']."&amp;")."</div>n";
}

require_once THEMES."templates/footer.php";
0 replies
D
diesltek710
D
  • Junior Member, joined since
  • Contributed 39 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
answered
Junior Member

Still stuck on this...
0 replies
M
MathiasHU
M
https://fusion.bltfm.hu/
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 3 threads in the forums
  • Answered 1 question
answered
Junior Member

Quote

Major - i havw the data displayed as i would like for the most part except for the times available. How can i convert the value of 0 / 1 to be No or Yes (through php rendering not through changing the data in the db)

Ready

Quote

The minor issue that I am having is as you can see in the screen shot that on mobile devices the table dosnt properly fit the screen.. Is there any way to better format this information so it looks presentable and dosnt break the page?

Ready

Quote

Secondly i would like to have a total at the bottom that counts how many people are available at that time.

what time is it
I do not really understand

<?php

require_once __DIR__.'/maincore.php';
require_once THEMES.'templates/header.php';

include LOCALE.LOCALESET.'members.php';

add_to_title("Eden Stats");

opentable("Eden Stats");
if (iMEMBER) {
 if (!isset($_GET['sortby']) || !ctype_alnum($_GET['sortby'])) {
 $_GET['sortby'] = "all";
 }
 $orderby = ($_GET['sortby'] == "all" ? "" : " AND user_name LIKE '".stripinput($_GET['sortby'])."%'");
 $search_text = ((isset($_GET['search_text']) && preg_check("/^[-0-9A-Z_@S]+$/i", $_GET['search_text'])) ? $orderby = ' AND user_name LIKE "'.stripinput($_GET['search_text']).'%"' : $_GET['sortby']);
 $result = dbquery("SELECT user_id FROM ".DB_USERS." WHERE user_status='0'".$orderby);
 $rows = dbrows($result);
 if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) {
 $_GET['rowstart'] = 0;
 }
 if ($rows) {
 $i = 0;
 echo "<div style='overflow-x: auto;min-height: 0.01%;'><table cellpadding='0' cellspacing='0' width='100%'><tr>";
 echo "<td align='center' class='tbl2'><strong>".$locale['401']."</strong></td>";
 echo "<td class='tbl2'><strong>".$locale['405']."</strong></td>";
 //echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><strong>".$locale['402']."</strong></td>n";
 echo "<td align='center' class='tbl2'><strong>Current Loyalty</strong></td>";
 echo "<td align='center' class='tbl2'><strong>Calvery Level</strong></td>";
 echo "<td align='center' class='tbl2'><strong>Footment Level</strong></td>";
 echo "<td align='center' class='tbl2'><strong>Archer Level</strong></td>";
 echo "<td align='center' class='tbl2'><strong>Reset</strong></td>";
 echo "<td align='center' class='tbl2'><strong>+6</strong></td>";
 echo "<td align='center' class='tbl2'><strong>+8</strong></td>";
 echo "<td align='center' class='tbl2'><strong>+12</strong></td>";
 echo "<td align='center' class='tbl2'><strong>+16</strong></td>";
 echo "<td align='center' class='tbl2'><strong>+18</strong></td>";
 echo "<td align='center' class='tbl2'><strong>+23</strong></td>";
 echo "</tr>";
 $result = dbquery("SELECT user_id, user_name, user_status, user_level, user_groups, user_loyalty, user_cavs, user_foot, user_archer, user_reset, user_6, user_8, user_12, user_16, user_18, user_23 FROM ".DB_USERS." WHERE user_status='0'".$orderby." ORDER BY user_level DESC, user_name LIMIT ".$_GET['rowstart'].",20");
 while ($data = dbarray($result)) {
 $cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2");
 $i++;
 echo "<tr><td class='$cell_color'>".profile_link($data['user_id'], $data['user_name'], $data['user_status'])."</td>";
 $groups = "";
 $user_groups = explode(".", $data['user_groups']);
 $j = 0;
 foreach ($user_groups as $key => $value) {
 if ($value) {
 $groups .= "<a href='profile.php?group_id=".$value."'>".getgroupname($value)."</a>".($j < count($user_groups) - 1 ? ", " : "");
 }
 $j++;
 }
 echo "<td class='$cell_color'>".($groups ? $groups : ($data['user_level'] == 103 ? $locale['407'] : $locale['406']))."</td>";
 echo "<td align='center' class='$cell_color'>".$data['user_loyalty']."</td>";
 echo "<td align='center' class='$cell_color'> ".$data['user_cavs']."</td>";
 echo "<td align='center' class='$cell_color'> ".$data['user_foot']."</td>";
 echo "<td align='center' class='$cell_color'> ".$data['user_archer']."</td>";
 echo "<td align='center' class='$cell_color'>".$data['user_reset']."</td>";
 echo "<td align='center' class='$cell_color'>".($data['user_6'] == 0 ? "No" : "Yes")."</td>";
 echo "<td align='center' class='$cell_color'>".($data['user_8'] == 0 ? "No" : "Yes")."</td>";
 echo "<td align='center' class='$cell_color'>".($data['user_12'] == 0 ? "No" : "Yes")."</td>";
 echo "<td align='center' class='$cell_color'>".($data['user_16'] == 0 ? "No" : "Yes")."</td>";
 echo "<td align='center' class='$cell_color'>".($data['user_18'] == 0 ? "No" : "Yes")."</td>";
 echo "<td align='center' class='$cell_color'>".($data['user_23'] == 0 ? "No" : "Yes")."</td>";
 //echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>".getuserlevel($data['user_level'])."</td>n</tr>";
 }
 //echo "</table>n</div>n";
 } else {
 
 }
 echo "</tr></table></div>";
} else {
 redirect("index.php");
}
closetable();
if ($rows > 100) {
 echo "<div align='center' style='margin-top:5px;'>".makepagenav($_GET['rowstart'], 100, $rows, 3, FUSION_SELF."?sortby=".$_GET['sortby']."&amp;")."</div>";
}

require_once THEMES.'templates/footer.php';

0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 16 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

K
K
karrak 32
Van mi sosem változik..smile
  • Senior Member, joined since
  • Contributed 310 posts on the community forums.
  • Started 94 threads in the forums
  • Answered 1 question
D
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
D
D
  • Junior Member, joined since
  • Contributed 39 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
M
M
https://fusion.bltfm.hu/
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 3 threads in the forums
  • Answered 1 question

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet