当前位置: 首页>>代码示例>>PHP>>正文


PHP jscript_alert函数代码示例

本文整理汇总了PHP中jscript_alert函数的典型用法代码示例。如果您正苦于以下问题:PHP jscript_alert函数的具体用法?PHP jscript_alert怎么用?PHP jscript_alert使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了jscript_alert函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: games_game_save

function games_game_save($options)
{
    // Make handle from title
    $handle = isset($_POST['handle']) ? $_POST['handle'] : url_secure_string($_POST['title']);
    // Make array of controls
    $controls = array();
    for ($i = 0; $i < 8; $i++) {
        $controls[$i]['combination'] = $_POST['key_' . $i];
        $controls[$i]['description'] = $_POST['action_' . $i];
    }
    $release = isset($_POST['release_now']) ? time() : strtotime($_POST['release']);
    $query_insert = 'INSERT INTO games (handle, title, description, controls, `release`, highscore_gname)';
    $query_insert .= ' VALUES ("' . $handle . '", "' . $_POST['title'] . '", "' . $_POST['description'] . '", "' . mysql_real_escape_string(serialize($controls)) . '", ' . $release . ', "' . $_POST['highscore_gname'] . '")';
    $query_update = 'UPDATE games SET title = "' . $_POST['title'] . '"';
    $query_update .= ', description = "' . $_POST['description'] . '", controls = "' . mysql_real_escape_string(serialize($controls)) . '"';
    $query_update .= ', `release` = "' . $release . '"';
    $query_update .= ', highscore_gname = "' . $_POST['highscore_gname'] . '"';
    $query_update .= ' WHERE handle = "' . $handle . '"';
    log_to_file('games', LOGLEVEL_DEBUG, __FILE__, __LINE__, 'query_insert: ' . $query_insert);
    if (!mysql_query($query_insert)) {
        log_to_file('games', LOGLEVEL_DEBUG, __FILE__, __LINE__, 'query_update: ' . $query_update);
        mysql_query($query_update) or die(report_sql_error($query_update));
    } else {
        jscript_alert('Scheduling release');
        $schedule['item_id'] = mysql_insert_id();
        $schedule['type'] = 'new_game';
        $schedule['data'] = serialize($_POST);
        $schedule['release'] = $release;
        schedule_event_add($schedule);
    }
    $query = 'SELECT id, handle FROM games WHERE handle = "' . $handle . '"';
    $result = mysql_query($query) or die(report_sql_error($query));
    if ($data = mysql_fetch_assoc($result)) {
        $game_id = $data['id'];
        $game_handle = $data['handle'];
    }
    //save tags
    global $game_tags;
    foreach ($game_tags as $handle) {
        if (isset($_POST['chk_tag_' . $handle])) {
            $save['tag_handle'][] = $handle;
        }
    }
    $save['item_id'] = $game_id;
    $save['object_type'] = 'game';
    tag_set_wrap($save);
    unset($save);
    $save['item_id'] = $game_id;
    $save['object_type'] = 'game';
    $save['add'] = true;
    foreach (explode(',', $_POST['tags']) as $keyword) {
        $keyword = trim($keyword);
        $save['tag_label'][] = $keyword;
    }
    tag_set_wrap($save);
    /* Resize, convert and save the uploaded thumbnail */
    if (strlen($_FILES['thumbnail']['tmp_name']) > 1) {
        system('convert ' . $_FILES['thumbnail']['tmp_name'] . ' -resize 120x90! /mnt/images/games/' . $game_handle . '.png');
        echo 'Running: convert ' . $_FILES['thumbnail']['tmp_name'] . ' -resize 120x90! /mnt/images/games/' . $game_handle . '.png';
    }
    echo '<p>Nu är spelet sparat och spelets handle är: ' . $game_handle . '</p>' . "\n";
    echo 'game_id = ' . $game_id . '<br />' . "\n";
    return $game_handle;
}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:64,代码来源:games.lib.php

示例2: insert_avatar

    $out .= '</form>';
    $avatar_full_filename = $avatar_path_full . $_SESSION['login']['id'] . '.jpg';
    if (is_file($avatar_full_filename)) {
        $out .= '<h2 style="margin: 0px; ">Din nuvarande bild:</h2>';
        $out .= insert_avatar($_SESSION['login']['id'], 'style="border: 1px solid #333333;"');
        $out .= '<br /><b><a href="' . $_SERVER['PHP_SELF'] . '?action=delete">» Ta bort bilden</a></b>';
    }
} elseif ($_GET['step'] == '2') {
    if (!is_file($avatar_tmp_orginal_filename)) {
        jscript_alert('Någonting blev fel vid uppladdningen av bilden, försök igen!');
        jscript_go_back();
        die;
    }
    $copy_data = read_copy_protection($avatar_tmp_orginal_filename);
    if ($copy_data['copyright'] == 1 && $_SESSION['login']['id'] != $copy_data['userid']) {
        jscript_alert('Den gubben gick inte');
        jscript_go_back();
        die;
    }
    $avatar_height = intval(exec('identify ' . $avatar_tmp_orginal_filename . ' | cut -f3 -d" " | cut -f2 -d"x" | cut -f1 -d"+"'));
    $flash_height = $avatar_height + 70;
    //$crop_width = $avatar_height * 0.75;
    $crop_width = intval($avatar_height * 0.75);
    $out .= '<h1 style="margin: 0px; ">Skala och besk&auml;r ditt foto (steg 2)</h1>';
    $out .= 'Här kan du beskära och klippa ut valt område från ditt foto. Alla foton kommer klippas ut med ration 3:4.<br /><br />';
    $out .= '» Vill du ladda upp en annan bild så gå tillbaka till <a href="avatar-settings.php';
    if (isset($_GET['registerproccess'])) {
        $out .= '?registerproccess=1';
    }
    $out .= '">uppladdningen</a>.<br/>';
    $swfurl = 'cropper.swf?cropheight=' . $avatar_height . '&cropwidth=' . $crop_width . '&imageFile=' . $avatar_tmp_orginal_url . '&postFile=avatar-settings.php?action=crop';
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:31,代码来源:avatar-settings.php

示例3: intval

<?php

require 'include/core/common.php';
//session_start();
require_once PATHS_LIBRARIES . 'admin.lib.php';
$_GET['id'] = intval($_GET['id']);
if (!is_numeric($_GET['id']) && isset($_GET['id'])) {
    die('FISK ' . $_GET['id']);
}
if (isset($_GET['refuse']) && is_numeric($_GET['refuse']) && login_checklogin() && is_privilegied('avatar_admin')) {
    refuse_image($_GET['refuse'], $_SESSION['login']['username']);
    jscript_alert('Borttaget!');
    jscript_selfclose();
    die;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Visningsbild på Hamsterpaj</title>
<link rel="icon" href="http://images.hamsterpaj.net/favicon.png" type="image/x-icon" />
<link rel="shortcut icon" href="http://images.hamsterpaj.net/favicon.png" type="image/x-icon" />

<style type="text/css">
	@import url('/stylesheets/avatar.css');
	@import url('/stylesheets/shared.css');
</style>

<script type="text/javascript" language="javascript" src="/javascripts/avatar.js"></script>
</head>
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:31,代码来源:avatar.php

示例4: mysql_query

}
echo '<a href="?page=' . ($page + 1) . '" class="ascii_art_next">Nästa sida &raquo;</a>' . "\n";
echo '<br style="clear: both;" />' . "\n";
if (is_privilegied('ascii_art_admin')) {
    if (isset($_GET['delete']) && is_numeric($_GET['delete']) && (int) $_GET['delete'] > 0) {
        $query = 'DELETE FROM ascii_art WHERE id = ' . $_GET['delete'] . ' LIMIT 1';
        mysql_query($query) or report_sql_error($query);
        jscript_alert('Go, went och... GONE!');
        jscript_location('ascii_art.php');
    }
}
if (is_privilegied('ascii_art_admin')) {
    if (isset($_POST['title'], $_POST['the_art'])) {
        $query = 'INSERT INTO ascii_art (title, the_art) VALUES ("' . $_POST['title'] . '", "' . $_POST['the_art'] . '")';
        mysql_query($query) or report_sql_error($query);
        jscript_alert('Vi har nu lagt till ASCII-arten i databasen. Det kan dröja upp till 60 sekunder innan den dyker upp bland de andra ASCII-artsen!');
        jscript_location('ascii_art.php');
    }
    echo rounded_corners_top(array('color' => 'white'));
    ?>
		<form method="post" action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
">
			<input type="text" name="title" /> (titel)<br />
			<textarea name="the_art" style="width: 100%; height: 300px"></textarea><br />
			<input type="submit" value="Skapa" class="button_80" />
		</form>
		<?php 
    echo rounded_corners_bottom();
}
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:31,代码来源:ascii_art.php

示例5: jscript_alert

<?php

try {
    require '../include/core/common.php';
    if (!is_privilegied('gb_autoreport')) {
        jscript_alert('Denna sida kräver privilegiet: gb_autoreport');
        jscript_location('/');
        die('inte för dig...');
    }
    if (isset($_GET['action'])) {
        $action = $_GET['action'];
    } else {
        throw new Exception('No action in get data recieved');
    }
    switch ($action) {
        case 'post_validate':
            if (!is_numeric($_GET['id'])) {
                throw new Exception('ID not numeric');
            }
            $query = 'UPDATE gb_autoreport_posts SET checked = 1 WHERE id = ' . $_GET['id'];
            mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
            if ($_GET['return'] == true) {
                header('Location: /admin/gb_autoreport.php');
            }
            break;
        default:
            throw new Exception('Action not found');
            break;
    }
} catch (Exception $error) {
    echo '<div class="form_notice_error">';
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:31,代码来源:gb_autoreport.php

示例6: delete_entry

function delete_entry($entry_id, $recipient)
{
    $delete_sql = 'UPDATE traffa_guestbooks SET deleted = 1 WHERE id = ' . $entry_id . ' AND recipient = ' . $recipient . ' AND `read` = 1 LIMIT 1';
    mysql_query($delete_sql) or die('Ett kritiskt fel har uppstått! Felet uppstod i delete_entry().<br />Felinfo:<br />' . mysql_error());
    if (mysql_affected_rows() != 1) {
        jscript_alert('Ett fel har uppstått! Det verkar som om du försökt att ta bort någon annans inlägg!');
        return 0;
    }
    $update_sql = 'UPDATE traffa SET guestbook_entries = guestbook_entries - 1 WHERE userid = ' . $recipient . ' LIMIT 1';
    mysql_query($update_sql) or die('Ett kritiskt fel har inträffat! Felet uppstod i delete_entry() när inläggsräknaren skulle uppdateras.<br />Felinfo:<br />' . mysql_error());
    return 1;
}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:12,代码来源:guestbook-functions.php

示例7: ui_top

<?php

require '../include/core/common.php';
require $hp_includepath . 'admin-functions.php';
$ui_options['current_menu'] = 'admin';
ui_top($ui_options);
if (!is_privilegied('logout_user')) {
    die;
}
if (!isset($_GET['action'])) {
    echo 'vad görru!!!';
} elseif ($_GET['action'] == 'logout') {
    $query = 'SELECT id, session_id FROM login WHERE username = "' . $_GET['username'] . '"';
    $result = mysql_query($query) or report_sql_error($query);
    if (mysql_num_rows($result) > 0) {
        $data = mysql_fetch_assoc($result);
        $user_to_sess = $data['session_id'];
        $userid = $data['id'];
        unlink('/var/lib/php/session2/sess_' . $user_to_sess);
        $query = 'UPDATE login SET lastaction = "0" WHERE id = "' . $userid . '"';
        mysql_query($query) or report_sql_error($query);
        log_admin_event('user kicked', $_GET['username'] . ' was loged out by ' . $_SESSION['login']['username'], $_SESSION['login']['id'], $userid, $userid);
        jscript_alert('Personen är nu utloggad');
    } else {
        jscript_alert('Hittade inte användaren...');
    }
    jscript_go_back();
}
ui_bottom();
开发者ID:Razze,项目名称:hamsterpaj,代码行数:29,代码来源:logout_user.php

示例8: array

<?php

require '../include/core/common.php';
$ui_options['menu_path'] = array('admin', 'ov_watch');
$ui_options['stylesheets'][] = 'forms.css';
$ui_options['stylesheets'][] = 'ov_watch.css';
if (!is_privilegied('use_statistic_tools')) {
    jscript_alert('Denna sida kräver privilegiet: use_statistic_tools');
    jscript_location('/');
    die('inte för dig...');
}
// action types
$action_types = array('post removed' => array('name' => 'Borttagna inlägg', 'privilegie' => 'discussion_forum_remove_posts'), 'avatar validated' => array('name' => 'Validerade avatarer', 'privilegie' => 'avatar_admin'), 'ghost' => array('name' => 'Ghostade användare', 'privilegie' => 'use_ghosting_tools'), 'guestbook_hack' => array('name' => 'GB-hackade användare', 'privilegie' => 'use_ghosting_tools'), 'ip banned' => array('name' => 'IP-bannade användare', 'privilegie' => 'ip_ban_admin'), 'user blocked image upload' => array('name' => 'Avataruppladdningsblockeringar', 'privilegie' => 'avatar_admin'), 'user kicked' => array('name' => 'Utloggningar av användare', 'privilegie' => 'logout_user'), 'user recovered' => array('name' => 'Återskapande av användare', 'privilegie' => 'recover_user'), 'user warned' => array('name' => 'Varnade användare', 'privilegie' => 'warnings_admin'), 'user removed' => array('name' => 'Borttagna användare', 'privilegie' => 'remove_user'));
$out .= '<fieldset>' . "\n";
$out .= '<legend>Visa statistik från</legend>' . "\n";
$out .= '<form method="get">' . "\n";
$out .= '<table class="form">' . "\n";
$out .= '<tr>' . "\n";
$out .= '<td><label for="action">Typ av åtgärd:</label></td>' . "\n";
$out .= '<td>' . "\n";
$out .= '<select name="action">' . "\n";
foreach ($action_types as $action => $option) {
    $out .= '<option value="' . $action . '">' . $option['name'] . '</option>' . "\n";
}
$out .= '</select>' . "\n";
$out .= '</td>' . "\n";
$out .= '<td><label for="days">Antal dagar:</label></td>' . "\n";
$out .= '<td><input type="text" name="days" /></td>' . "\n";
$out .= '</tr>' . "\n";
$out .= '</table>' . "\n";
$out .= '<input type="submit" value="Filtrera" />' . "\n";
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:31,代码来源:ov_watch.php

示例9: jscript_go_back

        jscript_go_back();
        break;
    case 'read':
        traffa_draw_user_div($_SESSION['login']['id'], $_SESSION);
        if (!messages_view($_GET['message_id'], $_SESSION['login']['id']) || !is_numeric($_GET['message_id'])) {
            jscript_alert('Ett problem uppstod när meddelandet skulle visas. Du kanske inte kan läsa detta meddelande.');
            jscript_location($_SERVER['PHP_SELF']);
        }
        break;
    case 'conversation':
        $options = array('mode' => 'conversation', 'user' => $_GET['user'], 'order' => $_GET['order'], 'direction' => $_GET['direction'], 'offset' => $_GET['offset']);
        messages_list($_SESSION['login']['id'], $options);
        break;
    case 'list_sent':
        traffa_draw_user_div($_SESSION['login']['id'], $_SESSION);
        $options = array('order' => $_GET['order'], 'mode' => 'sent', 'direction' => $_GET['direction'], 'offset' => $_GET['offset']);
        messages_list($_SESSION['login']['id'], $options);
        break;
    case 'inbox':
        traffa_draw_user_div($_SESSION['login']['id'], $_SESSION);
        $options = array('order' => $_GET['order'], 'mode' => 'recieved', 'direction' => $_GET['direction'], 'offset' => $_GET['offset']);
        messages_list($_SESSION['login']['id'], $options);
        messages_pre_compose();
        break;
    default:
        jscript_alert('Ett okänt action-värde skickades! Dödar scriptet.');
        die;
        break;
}
echo '</div>';
ui_bottom();
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:messages.php

示例10: mysql_query

    echo '<form action="' . $_SERVER['PHP_SELF'] . '?action=update" method="post">' . "\n";
    echo '<input type="hidden" name="id" value="' . $data['id'] . '" />' . "\n";
    echo '<h5>Förkortning</h5>' . "\n";
    echo '<input type="text" name="acronym" value="' . $data['acronym'] . '" />' . "\n";
    echo '<h5>Betydelse</h5>' . "\n";
    echo '<input type="text" class="inp_meaning" name="meaning" value="' . $data['meaning'] . '" />' . "\n";
    echo '<h5>Förklaring</h5>' . "\n";
    echo '<textarea name="explanation" class="txt_explanation">' . $data['explanation'] . '</textarea>' . "\n";
    echo '<input type="submit" class="button" value="Spara ändringar" />' . "\n";
    echo '</form>' . "\n";
    echo '</div>' . "\n";
}
if (isset($_GET['report']) && is_numeric($_GET['report']) && is_privilegied('abbr_admin')) {
    $query = 'UPDATE acronyms SET reports = reports + 1 WHERE id = ' . $_GET['report'] . ' LIMIT 1';
    mysql_query($query) or die(report_sql_error($query));
    jscript_alert('Tackar, en ordningsvakt kommer att kika på din rapport');
}
if ($_GET['action'] == 'verify' && is_numeric($_GET['id']) && is_privilegied('abbr_admin')) {
    $query = 'UPDATE acronyms SET verified = 1, reports = 0 WHERE id = ' . $_GET['id'] . ' LIMIT 1';
    mysql_query($query) or die(report_sql_error($query));
}
if ($_GET['action'] == 'update' && is_privilegied('abbr_admin')) {
    $query = 'UPDATE acronyms SET acronym = "' . $_POST['acronym'] . '", meaning = "' . $_POST['meaning'] . '", explanation = "';
    $query .= $_POST['explanation'] . '", reports = 0, verified = 1 WHERE id = ' . $_POST['id'] . ' LIMIT 1';
    mysql_query($query) or die(report_sql_error());
    $_GET['id'] = $_POST['id'];
}
function acro_fetch($letter = 'a')
{
    $query = 'SELECT id, acronym, meaning, explanation, reports, verified FROM acronyms';
    $query .= ' WHERE acronym LIKE "' . $letter . '%"';
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:31,代码来源:foerkortningar.php

示例11: array

<?php

require '../include/core/common.php';
$ui_options['menu_path'] = array('traeffa', 'grupper');
$ui_options['title'] = 'Gruppnotiser - Hamsterpaj.net';
ui_top($ui_options);
if (login_checklogin() != 1) {
    jscript_alert('Du måste vara inloggad för att komma åt denna sidan!');
    jscript_location('index.php');
}
$output .= rounded_corners_top(array('color' => 'blue'));
echo '<h2 style="margin-top: 0px;">Nya inlägg i dina grupper</h2>';
foreach ($_SESSION['groups_members'] as $key => $value) {
    $query = 'SELECT groups_list.message_count, groups_members.read_msg, groups_list.name, groups_members.notices FROM groups_members, groups_list ';
    $query .= 'WHERE groups_members.groupid = ' . $value . ' AND groups_list.groupid = ' . $value;
    $query .= ' AND groups_members.userid =' . $_SESSION['login']['id'];
    $result = mysql_query($query) or die(report_sql_error($query));
    $data = mysql_fetch_assoc($result);
    if ($data['notices'] == "Y") {
        $new_posts = $data['message_count'] - $data['read_msg'];
        if ($new_posts > 0) {
            echo '<strong>';
        }
    }
    echo '<a href="groups.php?action=goto&groupid=' . $value . '">' . $data['name'] . '</a>';
    if ($data['notices'] == "Y") {
        echo ' - ' . $new_posts . ' nya inlägg.';
        if ($new_posts > 0) {
            echo '</strong>';
        }
    } else {
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:groupnotices.php

示例12: photos_get_categories

$ui_options['javascripts'][] = 'codepress.js';
$ui_options['javascripts'][] = 'rank.js';
$ui_options['stylesheets'][] = 'photos.css';
$ui_options['javascripts'][] = 'photos.js';
if (is_privilegied('articles_admin')) {
    $display_successful_message = false;
    for ($i = 0; $i < PHOTOS_MAX_UPLOADS; $i++) {
        if (is_uploaded_file($_FILES['photo_' . $i]['tmp_name'])) {
            $options['file'] = $_FILES['photo_' . $i]['tmp_name'];
            $options['user'] = 2348;
            $options['description'] = $_POST['description_' . $i];
            $options['category'] = $_POST['category_' . $i];
            $category = photos_get_categories(array('user' => $options['user'], 'name' => $options['category'], 'create_if_not_found' => true));
            $category = array_pop($category);
            $query = 'UPDATE articles SET photo_category_id = "' . $category['id'] . '" WHERE id = "' . $_GET['article_id'] . '" LIMIT 1';
            jscript_alert($query);
            mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
            $photo_id = photos_upload($options);
            $display_successful_message = true;
        }
    }
    if ($display_successful_message) {
        $upload_form .= rounded_corners_top(array('color' => 'blue_deluxe'), true);
        $upload_form .= 'Bilderna är uppladdade!';
        $upload_form .= rounded_corners_bottom(array('color' => 'blue_deluxe'), true);
    }
    $upload_form .= photos_upload_form(array('user' => 2348));
}
ui_top($ui_options);
echo $upload_form;
echo $_POST['category_' . $i];
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:upload_photos.php

示例13: explode



</script></form>
<?php 
        break;
    case 'organize':
        if ($_GET['perform'] == 'true') {
            $explosion = explode(',', $_POST['order']);
            for ($i = 0; $i < count($explosion); $i++) {
                $positions[$explosion[$i]] = $i + 1;
            }
            foreach ($_POST as $input => $value) {
                print_r($_POST);
                if (is_numeric($input)) {
                    if (strlen(trim($value)) < 2) {
                        echo jscript_alert('Kunde inte byta namn på kategori ' . $categories[$input]['title'] . ', det nya namnet är för kort.');
                    } else {
                        $query = 'UPDATE photo_albums SET title = "' . $value . '", position = "' . $positions[$input] . '" WHERE owner = "' . $_SESSION['login']['id'] . '" AND id ="' . $input . '" LIMIT 1';
                        mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
                    }
                }
            }
            jscript_location('/traffa/profile.php?id=' . $_SESSION['login']['id']);
        }
        echo '<h2>Flytta och byt namn på dina fotoalbum</h2>';
        echo '<form name="form" action="' . $_SERVER['PHP_SELF'] . '?id=' . $_GET['id'] . '&action=organize&perform=true" method="post"';
        echo ' onSubmit="inspect(\'testlist\');">';
        ?>
<script src="/include/jsdragdrop/prototype.js" type="text/javascript"></script>
<script src="/include/jsdragdrop/scriptaculous.js" type="text/javascript"></script>
<style>
开发者ID:Razze,项目名称:hamsterpaj,代码行数:29,代码来源:photos-customize.php

示例14: mysql_query

     break;
 case 'update':
     $query = 'SELECT author FROM suggestions WHERE id = "' . $_POST['id'] . '" LIMIT 1';
     $result = mysql_query($query);
     if (mysql_num_rows($result) == 1) {
         $data = mysql_fetch_assoc($result);
         $message['recipient'] = $data['author'];
         $message['sender'] = 2348;
         $message['message'] = 'Hej, ditt förslag har uppdaterats, ny status för ditt förslag är: ' . $SUGGESTIONS['classifications'][$_POST['classification']]['label'] . '!' . "\n";
         $message['message'] .= strlen($_POST['responsible_username']) > 1 ? 'Ansvarig för ditt förslag är: ' . $_POST['responsible_username'] : '';
         $message['message'] .= "\n" . 'Texten i det berörda förslaget lyder: ' . "\n" . $_POST['text'];
         $message['message'] .= "\n\n" . 'Svaret på ditt förslag lyder: ' . "\n" . $_POST['reply'];
         guestbook_insert($message);
     }
     suggestion_update($_POST);
     jscript_alert('Fixat och donat!');
     jscript_location('/hamsterpaj/suggestions.php?action=view_waiting');
     break;
 case 'delete':
     $options['id'] = $_GET['id'];
     $options['display_level'] = 'removed';
     suggestion_update($options);
     break;
 case 'view_waiting':
     echo '<h1>Förslag som väntar på att granskas</h1>';
     $fetch['classification'] = array('waiting');
     $suggestions = suggestion_fetch($fetch);
     suggestion_list($suggestions);
     break;
 case 'processed':
     echo '<h1>Förslag som vi granskat</h1>' . "\n";
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:suggestions.php

示例15: event_log_log

    } else {
        event_log_log('classic_reg_form_sign_up');
        /* Input from user is OK, create rows in required tables */
        $query = 'INSERT INTO login(username, password, regtimestamp, regip, lastlogon) ';
        $query .= 'VALUES ("' . $_POST['username'] . '", "' . md5(utf8_decode($_POST['password'])) . '", "';
        $query .= time() . '", "' . $_SERVER['REMOTE_ADDR'] . '", "")';
        mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
        $user_id = mysql_insert_id();
        $query = 'INSERT INTO userinfo (userid) VALUES ("' . $user_id . '")';
        mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
        $query = 'INSERT INTO traffa (userid) VALUES ("' . $user_id . '")';
        mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
        $query = 'INSERT INTO preferences (userid) VALUES ("' . $user_id . '")';
        mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
        /* Rows created, log on the user */
        login_dologin($_POST['username'], $_POST['password']);
        /* Redirect to welcome page asking the user for more information */
        jscript_alert('Du kan numera känna dig som en riktig Hamsterpajare!\\nVi loggar in dig på ditt konto nu.');
        jscript_location('/registered.php');
    }
} else {
    regform_header_p13();
    regform_header_welcome();
    register_form();
    event_log_log('classic_reg_form_load');
}
ui_bottom();
?>


开发者ID:Razze,项目名称:hamsterpaj,代码行数:28,代码来源:register.php


注:本文中的jscript_alert函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。