Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[v2.07] Manual Confirm User [Updated]
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2011-10-29 18:40:43
The confirm reg section in 2.xx is very very bad code, i have just re-coded it and i made it skip invited users as they will have temporary usernames like

invite_453924243922492492492494 or whatever to use this you must add this to backend/java_klappe.js

  function checkAll(box)

 {

 var x = document.getElementsByTagName('input');

 

 for ( var i = 0; i < x.length; i++ )

 {

 if ( x[i].type == 'checkbox' ) {

 

 if (box.checked)

 x[i].checked = false;

 else

 x[i].checked = true;  

 }

 }

 

 if (box.checked)

 box.checked = false;

 else

 box.checked = true;

 }
Next Find and remove




if($action == "confirmreg")

{

stdhead("Manual Registration Confirm");

navmenu();

begin_frame("Info On This List", justify);

?>

<p align="justify">This page shows all users that have not clicked the ACTIVATION link in the signup email, they cannot access the site until they have clicked this link.  You should only manually confirm a user if they request it (via email, irc or other method), where they have lost or not received the email.  All PENDING users will be cleaned from the system every so often.</p>

<?php

end_frame();

begin_frame("Manual Registration Confirm", center);

begin_table();

$perpage = 100;

print("<tr><td align=\"center\"  class=alt3 align=left><font size=1 face=Verdana>Username</td><td align=\"center\"  class=alt3><font size=1 face=Verdana>".T_("EMAIL_ADDRESS")."</td><td align=\"center\"  class=alt3><font size=1 face=Verdana>Date Registered</td><td align=\"center\"  class=alt3 align=left><font size=1 face=Verdana>IP</td><td align=\"center\"  class=alt3><font size=1 face=Verdana>Status</td></tr>\n");



$resww = "SELECT * FROM users WHERE status='pending' ORDER BY username";

$reqww = mysql_query($resww);

while ($row = mysql_fetch_array($reqww))

{

extract ($row);

 echo "<tr><td align='center'>$row[username]</td><td align='center'>$row[email]</td><td align='center'>$row[added]</td><td align='center'>$row[ip]</td><td align='center'><a href='admincp.php?action=editreg&id=$row[id]'>$row[status]</a></td></tr>\n";



}

end_table();

end_frame();

stdfoot();

}



if($action == "save_editreg")

// SAVE THEME EDIT FUNCTION

{

mysql_query("UPDATE users SET status='$ed_status' WHERE id=$id");

show_error_msg("Updated", "<br><br><center><b>Updated ".T_("COMPLETED")."</b><BR><BR><a href='admincp.php?action=confirmreg'>Click here</a> to go back.</center>");

}



if($action == "editreg" && $id != "")

// EDIT USER REG FORM

{

$qq = MYSQL_QUERY("SELECT * FROM users WHERE id = $id");

$ee = MYSQL_FETCH_ARRAY($qq);

stdhead();

navmenu();

begin_frame();

?>



<form action='admincp.php' method='post'>

<input type='hidden' name='id' value='<?php echo $id?>'>

<input type='hidden' name='action' value='save_editreg'>

Name: <?php echo $ee[username]?><br />

Surrent Status: <?php echo $ee[status]?><br>

<select name='ed_status'>

<option value='pending' <?php if($status == "pending") echo "selected"; ?>>pending

<option value='confirmed' <?php if($status == "confirmed") echo "selected"; ?>>confirmed

</select>

<!--<input type='text' value='<?php echo $ee[status]?>' size='30' maxlength='30' name='ed_status'><br />-->

<input type='submit' value='   Save   ' style='background:#eeeeee'>&nbsp;&nbsp;&nbsp;<input type='reset' value='  Reset  ' style='background:#eeeeee'>

</form>

<?php

end_frame();

}





Now drop this in its place.





#======================================================================#

# Manual Conf Reg - Updated by djhowarth (29-10-2011)

#======================================================================#

if ($action == "confirmreg")

{

if ($do == "confirm")

{

if ($_POST["confirmall"])

SQL_Query_exec("UPDATE `users` SET `status` = 'confirmed' WHERE `status` = 'pending' AND `invited_by` = '0'");

else

{

if (!@count($_POST["users"])) show_error_msg("Error", "Nothing selected", 1);

$ids = array_map("intval", $_POST["users"]);

$ids = implode(", ", $ids);

SQL_Query_exec("UPDATE `users` SET `status` = 'confirmed' WHERE `status` = 'pending' AND `invited_by` = '0' AND `id` IN ($ids)");  

}



autolink("admincp.php?action=confirmreg", "Entries Confirmed");

}



$res = SQL_Query_exec("SELECT `id`, `username`, `email`, `added`, `ip` FROM `users` WHERE `status` = 'pending' AND `invited_by` = '0'");

$num = mysql_num_rows($res);



stdhead("Manual Registration Confirm");

navmenu();



begin_frame("Manual Registration Confirm");

?>



<p align="center">

This page displays all unconfirmed users excluding users which have been invited by current members. <?php echo number_format($num); ?> members are pending;

</p>



<?php if ($num > 0): ?>

<br />

<form method="post" action="admincp.php?action=confirmreg&do=confirm">

<table border="0" cellpadding="3" cellspacing="0" width="100%" align="center" class="table_table">

<tr>

<th class="table_head">Username</th>

<th class="table_head">E-mail</th>

<th class="table_head">Registered</th>

<th class="table_head">IP</th>

<th class="table_head"><input type="checkbox" id="checkAll" onclick="checkAll(this);"></th>

</tr>

<?php while ($row = mysql_fetch_assoc($res)): ?>

<tr>

<td class="table_col1" align="center"><?php echo $row["username"]; ?></td>

<td class="table_col2" align="center"><?php echo $row["email"]; ?></td>

<td class="table_col1" align="center"><?php echo utc_to_tz($row["added"]); ?></td>

<td class="table_col2" align="center"><?php echo $row["ip"]; ?></td>

<td class="table_col1" align="center"><input type="checkbox" name="users[]" value="<?php echo $row["id"]; ?>" /></td>

</tr>

<?php endwhile; ?>

<tr>

<td colspan="5" align="right">

<input type="submit" value="Confirm Checked" />

<input type="submit" name="confirmall" value="Confirm All" />

</td>

</tr>

</table>

</form>

<?php endif; ?>



<?php

end_frame();

stdfoot();

}





Add to backend/functions.php





function autolink($al_url, $al_msg) {

 stdhead();

 begin_frame("");

 echo "\n<meta http-equiv=\"refresh\" content=\"3; URL=$al_url\">\n";

 echo "<b>$al_msg</b>\n";

 echo "\n<b>Redirecting ...</b>\n";

 echo "\n[ <a href='$al_url'>link</a> ]\n";

 end_frame();

 stdfoot();

 exit;

 }




If you dont have SQL_Query_exec replace them to mysql_query. Added to SVN
Unknown User
2012-01-08 06:22:16
"XIII, post: 76184":
Next Find and remove


if($action == "confirmreg")

{

stdhead("Manual Registration Confirm");

navmenu();

begin_frame("Info On This List", justify);

?>

<p align="justify">This page shows all users that have not clicked the ACTIVATION link in the signup email, they cannot access the site until they have clicked this link.  You should only manually confirm a user if they request it (via email, irc or other method), where they have lost or not received the email.  All PENDING users will be cleaned from the system every so often.</p>

<?php

end_frame();

begin_frame("Manual Registration Confirm", center);

begin_table();

$perpage = 100;

print("<tr><td align=\"center\"  class=alt3 align=left><font size=1 face=Verdana>Username</td><td align=\"center\"  class=alt3><font size=1 face=Verdana>".T_("EMAIL_ADDRESS")."</td><td align=\"center\"  class=alt3><font size=1 face=Verdana>Date Registered</td><td align=\"center\"  class=alt3 align=left><font size=1 face=Verdana>IP</td><td align=\"center\"  class=alt3><font size=1 face=Verdana>Status</td></tr>\n");



$resww = "SELECT * FROM users WHERE status='pending' ORDER BY username";

$reqww = mysql_query($resww);

while ($row = mysql_fetch_array($reqww))

{

extract ($row);

 echo "<tr><td align='center'>$row[username]</td><td align='center'>$row[email]</td><td align='center'>$row[added]</td><td align='center'>$row[ip]</td><td align='center'><a href='admincp.php?action=editreg&id=$row[id]'>$row[status]</a></td></tr>\n";



}

end_table();

end_frame();

stdfoot();

}



if($action == "save_editreg")

// SAVE THEME EDIT FUNCTION

{

mysql_query("UPDATE users SET status='$ed_status' WHERE id=$id");

show_error_msg("Updated", "<br><br><center><b>Updated ".T_("COMPLETED")."</b><BR><BR><a href='admincp.php?action=confirmreg'>Click here</a> to go back.</center>");

}



if($action == "editreg" && $id != "")

// EDIT USER REG FORM

{

$qq = MYSQL_QUERY("SELECT * FROM users WHERE id = $id");

$ee = MYSQL_FETCH_ARRAY($qq);

stdhead();

navmenu();

begin_frame();

?>



<form action='admincp.php' method='post'>

<input type='hidden' name='id' value='<?php echo $id?>'>

<input type='hidden' name='action' value='save_editreg'>

Name: <?php echo $ee[username]?><br />

Surrent Status: <?php echo $ee[status]?><br>

<select name='ed_status'>

<option value='pending' <?php if($status == "pending") echo "selected"; ?>>pending

<option value='confirmed' <?php if($status == "confirmed") echo "selected"; ?>>confirmed

</select>

<!--<input type='text' value='<?php echo $ee[status]?>' size='30' maxlength='30' name='ed_status'><br />-->

<input type='submit' value='   Save   ' style='background:#eeeeee'>&nbsp;&nbsp;&nbsp;<input type='reset' value='  Reset  ' style='background:#eeeeee'>

</form>

<?php

end_frame();

}



Where would i find this at? i am new at this
Unknown User
2012-01-08 11:41:16
admincp.php
Unknown User
2012-01-08 16:42:30
thanks m8
2012-01-08 19:11:11
Big thanks XIII  :)
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728