Здравейте,
Става дума за една система за регистрация
успях по някакъв начин да я накарам да записва това което е написано а не да го изпълнява
но се появи друг проблем
като показвам показвам всички регистрирани тези кодове се изпълняват и нз как да го премахна това
ето кода с който показвам потребителите
Благодаря предварително за помоща
Става дума за една система за регистрация
успях по някакъв начин да я накарам да записва това което е написано а не да го изпълнява
но се появи друг проблем
като показвам показвам всички регистрирани тези кодове се изпълняват и нз как да го премахна това
ето кода с който показвам потребителите
Код:
echo '
<table class="main" cellspacing="1" cellpadding="4" width="100%">
<tr>
<td class="head" width="30%">Name</td>
<td class="head" width="50%">Email</td>
<td class="head" width="20%">Acces</td>';
if($is_administrator == TRUE) { echo'<td class="head" width="1%">Del</td>'; }
echo'</tr>';
if($users_per_page == ""){ $users_per_page = $userpage; }
if($start_from == "0"){ $start_from = ""; }
$all_userss = file("data/users.php");
$all_count_users = count($all_userss);
$flag = 1;
$i = $start_from;
$entries_showed = 0;
if(!empty($all_userss))
{
foreach ($all_userss as $users_line)
{
if($j < $start_from){ $j++; continue; }
$i++;
$users_arr = explode("|",$users_line);
$here = 0 + $start_from;
switch($users_arr[1])
{
case 1: $users_level = "Потребител"; break;
case 2: $users_level = "Moderator"; break;
case 3: $users_level = "Administrator"; break;
}
if ($i/2 == round($i/2)) { echo '<tr class="con1">'; }
else { echo '<tr class="con2">'; }
if($_GET['edit'] == TRUE and $_GET['userid'] == $users_arr[0]) echo '<td><a href="'.$PHP_SELF.'?id=modules/users&action=view_users&start_from='.$here.'&userid='.$users_arr[0].'">';
else echo '<td><a href="'.$PHP_SELF.'?id=modules/users&action=view_users&start_from='.$here.'&userid='.$users_arr[0].'&edit=TRUE#edit">';
echo ''.$users_arr[2].'</a></td>
<td><a href="mailto:'. $users_arr[4]. '">'. $users_arr[4]. '</a></td>
<td>'.$users_level.'</td>';
if($is_administrator == TRUE)
{
echo'<td align="center">';
if($users_arr[1] == 3){ echo'<img src="images/nodelete.gif" border="0" width="18" height="18" alt="Imposible to delete">'; }
else
{
$entries_next = count($all_userss) - $i;
if(!$entries_showed == 1)
{
if($entries_next == 0)
{
if($here == 0) $here = $users_per_page;
else $here = $here;
$start_from2 = $here - $users_per_page;
echo '<a href="'.$PHP_SELF.'?id=modules/users&action=delete_user&userid='.$users_arr[0].'&start_from='.$start_from2.'">';
}
if(!$entries_next != 1) { echo '<a href="'.$PHP_SELF.'?id=modules/users&action=delete_user&userid='.$users_arr[0].'&start_from='.$start_from.'">'; }
}
else { echo '<a href="'.$PHP_SELF.'?id=modules/users&action=delete_user&userid='.$users_arr[0].'&start_from='.$start_from.'">'; }
echo '<img src="images/delete.gif" border="0" width="18" height="18" alt="Delete User"></a>';
}
echo'</td>';
}
echo'</tr>';
$entries_showed ++;
if($i >= $users_per_page + $start_from){ break; }
}
}
if($entries_showed == 0) echo '<tr><td class="con1" colspan="4">No users registered yet</td></tr>';
echo '</table><table><tr><td></td></tr></table>';
if($start_from > 0)
{
$previous = $start_from - $users_per_page;
$npp_nav .= '<td width="50%" class="con1" align="left"><a href="'.$PHP_SELF.'?id=modules/users&action=view_users&start_from='.$previous.'&users_per_page='.$users_per_page.'"><< Previous</a></td>';
$tmp = 1;
}
if(count($all_userss) > $users_per_page)
{
$nr_nav .= " [ ";
$enpages_count = @ceil($all_count_users/$users_per_page);
$enpages_start_from = 0;
$enpages = "";
for($j=1;$j<=$enpages_count;$j++)
{
if($enpages_start_from != $start_from) { $enpages .= '<a href="'.$PHP_SELF.'?id=modules/users&action=view_users&start_from='.$enpages_start_from.'&users_per_page='.$users_per_page.'"> '.$j.' </a>'; }
else { $enpages .= " <strong><u>$j</u></strong> "; }
$enpages_start_from += $users_per_page;
}
$nr_nav .= $enpages;
$nr_nav .= " ] ";
}
if(count($all_userss) > $i)
{
$how_next = count($all_userss) - $i;
if($how_next > $users_per_page){ $how_next = $users_per_page; }
$npp_nav .= '<td width="50%" class="con1" align="right"><a href="'.$PHP_SELF.'?id=modules/users&action=view_users&start_from='.$i.'&users_per_page='.$users_per_page.'">Next '.$how_next.' >></a></td>';
}
if($entries_showed != 0)
{
echo '<table class="main" cellspacing="1" cellpadding="4" width="100%">';
if($npp_nav == "") { echo''; }
else
{
echo'
<tr>
<td colspan="2" class="head">
<table cellspacing="-1" cellpadding="-2" width="100%">
<tr>
<td width="50%" align="left">Showing <b>'.$entries_showed.'</b> users from a total of <b>'.$all_count_users.'</b></td>
<td width="50%" align="right">'.$nr_nav.'</td>
</tr>
</table>
</td>
</tr>
<tr>';
}
if($npp_nav == "") { echo'<td class="con3">Showing <b>'.$entries_showed.'</b> users from a total of <b>'.$all_count_users.'</b></td>'; }
else { echo $npp_nav; }
echo '</tr></table>';
}
else
{
echo '<table class="main" cellspacing="1" cellpadding="4" width="100%">';
if($npp_nav == "") { echo''; }
else
{
echo'
<tr>
<td colspan="2" class="head">
<table cellspacing="-1" cellpadding="-2" width="100%">
<tr>
<td width="50%" align="left">Showing <b>'.$entries_showed.'</b> users from a total of <b>'.$all_count_users.'</b></td>
<td width="50%" align="right">'.$nr_nav.'</td>
</tr>
</table>
</td>
</tr>
<tr>';
}
if($npp_nav == "")
{ echo'<td class="con3">Showing <b>'.$entries_showed.'</b> users from a total of <b>'.$all_count_users.'</b></td>'; }
else { echo $npp_nav; }
echo '</tr></table>';
}
Благодаря предварително за помоща