Exemplo n.º 1
0
 * 
 * 
 * I do not know what I am documenting this file
 * so if you have any question -> ask me on m.anzawi2013@gmail.com
 * or visit my blog on http://www.phptricks.org
 * 
 * 
 */
if (isset($_GET['Activate'])) {
    $get = escape($_GET);
    // $subscriber = $subsc->getAllSubscribers("WHERE u_id={$get['activate']}");
    $data = array('u_id' => $get['Activate'], 'u_active' => 1);
    if ($subsc->update($data)) {
        echo "Activated";
    } else {
        echo "Unable to Activate" . implode('<br>', $subsc->errors());
    }
} elseif (isset($_GET['Deactivate'])) {
    $get = escape($_GET);
    $data = array('u_id' => $get['Deactivate'], 'u_active' => 0);
    if ($subsc->update($data)) {
        echo "Deactivatd";
    } else {
        echo "Unable to Deactivate" . implode('<br>', $subsc->errors());
    }
}
?>
<style>
    td {
        padding: 10px; text-align: center; border: 1px solid #333;
    }
Exemplo n.º 2
0
/**
 * 
 * 
 * I do not know what I am documenting this file
 * so if you have any question -> ask me on m.anzawi2013@gmail.com
 * or visit my blog on http://www.phptricks.org
 * 
 * 
 */
$subsc = new Subscribe();
if (isset($_GET['delete'])) {
    $get = escape($_GET);
    if ($subsc->delete($get['delete'])) {
        echo "Deleted";
    } else {
        echo "Unable to Delete <br>" . implode('<br>', $subsc->errors());
    }
}
?>
<style>
    td {
        padding: 10px; text-align: center; border: 1px solid #333;
    }
</style>
<p>
    Here You Can activate or deactivate Subscribers.
</p>
<table>
    <thead>
        <tr>
            <td>User Name</td>