示例#1
0
 function Update($name, $surname, $type, $mess, $uid)
 {
     if (birthday08::CheckUid($uid)) {
         $sql = "UPDATE birthday08 SET name='{$name}',surname='{$surname}',type=" . intval($type) . ",message='{$mess}' where uid='{$uid}'";
         pg_query(DBConnect(), $sql);
         return true;
     }
     return false;
 }
示例#2
0
if (!hasPermissions('birthday')) {
    exit;
}
$action = trim($_GET['action']);
$msettings = new settings();
switch ($action) {
    case 'delete':
        $id = trim($_GET['id']);
        if ($id) {
            $error = birthday08::Delete($id);
        }
        break;
    case 'status':
        $msettings->SetVariable('birthday08', 'status', $_GET['value']);
}
$users = birthday08::GetAll();
?>
<script src="/scripts/warning.js" type="text/javascript"></script>

<?php 
if ($msettings->GetVariable('birthday08', 'status') == 'open') {
    ?>
		<B>Статус регистрации: Открыта</B> &nbsp;&nbsp;&nbsp; &raquo; <A href="./?action=status&value=close" class="blue">Закрыть</A>

<?php 
} else {
    ?>

		<B>Статус регистрации: Закрыта</B> &nbsp;&nbsp;&nbsp; &raquo; <A href="./?action=status&value=open" class="blue">Открыть</A>

<?php