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


PHP jscript_location函数代码示例

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


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

示例1: while

        $out .= '</tr>' . "\n";
        while ($data = mysql_fetch_assoc($result)) {
            $userlabel = $data['forum_userlabel'];
            if (!isset($assigned[$userlabel])) {
                $assigned[$userlabel] = '%VALUE%';
                $border .= 'style="border-top: solid;"' . "\n";
            }
            $out .= '<tr>' . "\n";
            $out .= '<td ' . $border . '>' . $data['username'] . '</td>' . "\n";
            $out .= '<td ' . $border . '>' . $userlabel . '</td>' . "\n";
            $out .= '</tr>' . "\n";
            $border = "";
        }
        $out .= '</table>' . "\n";
        break;
    case 'change':
        $forum_userlabel = $_POST['forum_userlabel'];
        $user_id = $_POST['user_id'];
        $query = 'UPDATE userinfo SET forum_userlabel = "' . $forum_userlabel . '" WHERE userid = ' . $user_id . ' LIMIT 1';
        mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
        $out .= 'Ändrat';
        log_admin_event('userlabel changed', $_POST['forum_userlabel'], $_SESSION['login']['id'], $_POST['user_id'], '');
        jscript_alert('Användarens forumstatus är ändrad');
        jscript_location('/admin/forum_userlabel.php');
}
$out .= rounded_corners_bottom();
ui_top($ui_options);
echo $out;
ui_bottom();
?>
	
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:30,代码来源:forum_userlabel.php

示例2: trace

    trace('register_error', 'register.php acsessed by not logged on user...');
} else {
    if (isset($_POST['submit_button'])) {
        $check = regform_check($_POST);
        if ($check === true) {
            unset($data);
            $data['userinfo']['gender'] = $_POST['gender'];
            $data['userinfo']['zip_code'] = $_POST['zip_code'];
            $data['userinfo']['birthday'] = $_POST['birth_year'] . '-' . $_POST['birth_month'] . '-' . $_POST['birth_day'];
            login_save_user_data($_SESSION['login']['id'], $data);
            session_merge($data);
            /*$alert = 'Tackar! Nu skickar vi dig till en introduktionssida som berättar mer om Hamsterpaj,\\n';
            		$alert .= 'vad man gör här och hur sidan fungerar, du måste inte läsa den om du inte vill.';
            		jscript_alert($alert);
            		jscript_location('/hamsterpaj/introduction.php');*/
            jscript_alert('Eftersom Lef inte gjort klart välkommen-sidan ännu så kan vi inte skicka dig till den. Hursomhelst så är du välkommen till hamsterpaj, och vi skickar dig nu till startsidan för träffa.\\n\\nDet skulle dessutom vara kul för folk att veta vem du är, klicka på Inställningar i menyn så kan du ladda upp en bild på dig själv eller göra din egna presentation.\\n\\nÅter igen; välkommen!');
            jscript_location('/traffa/');
        } else {
            regform_fail();
            regform_settings($_POST, $check);
        }
    } else {
        regform_header();
        regform_settings();
    }
}
ui_bottom();
?>


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

示例3: jscript_alert

<?php

require '../include/core/common.php';
$ui_options['stylesheets'][] = 'hpads_admin.css';
$ui_options['javascripts'][] = 'hpads_admin.js';
$ui_options['title'] = 'Startsidan på Hamsterpaj';
if (!is_privilegied('hp_ad_admin')) {
    jscript_alert('En skyddad sida, du är inte välkommen');
    jscript_location('/');
    die('Du måste ha privilegie för att nå den här sidan');
}
ui_top($ui_options);
$_POST['html'] = html_entity_decode($_POST['html']);
if ($_POST['action'] == 'create') {
    $uniqid = md5(rand() . uniqid() . microtime());
    $query = 'INSERT INTO hp_ads (name, area, credits, expire, html, probability, uniqid) VALUES("';
    $query .= $_POST['name'] . '", "' . $_POST['area'] . '", "' . $_POST['credits'] . '", "' . strtotime($_POST['expire']) . '", "' . $_POST['html'];
    $query .= '", "' . $_POST['probability'] . '", "' . $uniqid . '")';
    mysql_query($query);
}
if ($_POST['action'] == 'update') {
    $query = 'UPDATE hp_ads SET name = "' . $_POST['name'] . '", area = "' . $_POST['area'] . '", credits = "' . $_POST['credits'] . '"';
    $query .= ', expire = "' . strtotime($_POST['expire']) . '", html = "' . $_POST['html'] . '", probability = "' . $_POST['probability'] . '"';
    $query .= ' WHERE id = "' . $_POST['id'] . '" LIMIT 1';
    mysql_query($query);
}
echo hpads_form();
ui_bottom();
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:28,代码来源:hpads.php

示例4: 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

示例5: jscript_alert

                jscript_alert('Det där går inte, du måste skriva in ditt nuvarande lösenord, annars funkar inte skiten. Seså, gör om gör rätt!');
                jscript_go_back();
                exit;
            }
            if ($_POST['password_new'] != $_POST['password_verify']) {
                jscript_alert('"Nytt lösenord" och "Upprepa nytt lösenord" måste ju vara samma, annars funkar det ju inte :(');
                jscript_go_back();
                exit;
            }
            $newdata['login']['password'] = hamsterpaj_password(utf8_decode($_POST['password_new']));
            break;
    }
    login_save_user_data($_SESSION['login']['id'], $newdata);
    session_merge($newdata);
    jscript_alert('Ändrat, fixat och donat :)');
    jscript_location($_SERVER['PHP_SELF']);
}
if ($_POST['action'] == 'profile_theme') {
    $query = 'UPDATE userinfo SET profile_theme = "' . $_POST['theme'] . '" WHERE userid = "' . $_SESSION['login']['id'] . '" LIMIT 1';
    mysql_query($query) or report_sql_error($query);
    $_SESSION['userinfo']['profile_theme'] = $_POST['theme'];
}
/* Frivillig information */
$out .= '<a name="optional_info"></a>';
$out .= rounded_corners_tabs_top($void, true);
$out .= '<h2 style="margin-top: 0px;">Frivillig information</h2>' . "\n";
$out .= '<form action="' . $_SERVER['PHP_SELF'] . '?action=perform_changes&type=optional_info" method="post" name="optional_info">';
$out .= '<strong>Är du flicka eller pojke?</strong><br />' . "\n";
$out .= '<input type="radio" name="gender" value="m" ';
if ($_SESSION['userinfo']['gender'] == 'm') {
    $out .= 'checked="1" ';
开发者ID:Rambutan,项目名称:hamsterpaj,代码行数:31,代码来源:generalsettings.php

示例6: 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

示例7: snyggve_get_latest

}
function snyggve_get_latest()
{
    $query = 'SELECT id, title FROM snyggve ORDER by ID DESC LIMIT 12';
    $result = mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
    while ($data = mysql_fetch_assoc($result)) {
        $items[] = $data;
    }
    return $items;
}
if ($_GET['action'] == 'upload' && login_checklogin()) {
    $identifier = displace_image();
    saveform($identifier);
} elseif ($_GET['action'] == 'save' && login_checklogin()) {
    $id = saveimage();
    jscript_location('?action=view_image&image_id=' . $id);
} elseif ($_GET['action'] == 'view_image') {
    $user = view_image($_GET['image_id']);
    if (!view_album($user)) {
        echo '<h2>Senast uppladdat till Snyggve</h2>' . "\n";
        snyggve_list_items(snyggve_get_latest());
    }
    if (login_checklogin()) {
        uploadform();
    }
} elseif ($_GET['action'] == 'view_user' && is_numeric($_GET['user_id'])) {
    snyggve_intro();
    view_album($_GET['user_id'], 'fulhack');
    if (login_checklogin()) {
        uploadform();
    }
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:31,代码来源:snyggve.php

示例8: isset

        $w = isset($_GET['w']) ? intval($_GET['w']) : 0;
        $h = isset($_GET['h']) ? intval($_GET['h']) : 0;
        $ext = $data['extension'];
        if (file_exists(UPLOAD_PATH . $id . '_' . $w . '_' . $h . '.' . $ext)) {
            unlink(UPLOAD_PATH . $id . '_' . $w . '_' . $h . '.' . $ext);
        }
        //update db
        $query = 'UPDATE ' . WALLPAPERS_RES_RELATION . ' SET is_removed = 1 
						WHERE pid = ' . $id . ' AND resolution_pid = (SELECT id FROM ' . WALLPAPERS_RES . ' WHERE resolution_w = ' . $w . ' AND resolution_h = ' . $h . ')';
        mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
        //if it's the last resolution delete wallpaper
        $query = 'SELECT NULL FROM ' . WALLPAPERS_RES_RELATION . ' WHERE is_removed = 0 AND pid = ' . $id;
        //is there more resoltions?
        $result = mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
        if (mysql_num_rows($result) == 0) {
            //delete wallpaper
            $query = 'UPDATE ' . WALLPAPERS_TABLE . ' SET is_removed = 1 WHERE id = ' . $id;
            mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
            if (file_exists(UPLOAD_PATH . $id . '_preview.' . $ext)) {
                unlink(UPLOAD_PATH . $id . '_preview.' . $ext);
            }
            if (file_exists(UPLOAD_PATH . $id . '_thumb.' . $ext)) {
                unlink(UPLOAD_PATH . $id . '_thumb.' . $ext);
            }
        }
        jscript_location('?action=home');
        //end wallpapers
        break;
}
echo rounded_corners_tabs_bottom();
ui_bottom();
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:31,代码来源:wallpapers_admin.php

示例9: array

<?php

require '../include/core/common.php';
require PATHS_LIBRARIES . 'promoe.lib.php';
require PATHS_CONFIGS . 'promoe.conf.php';
$ui_options['menu_path'] = array('mattan', 'promoe');
$ui_options['title'] = 'Promoe på Hamsterpaj.net, rita dina egna pixel-bilder!';
$ui_options['stylesheets'][] = 'promoe_new.css';
$ui_options['javascripts'][] = 'promoe_new.js';
ui_top($ui_options);
if (login_checklogin() && isset($_GET['save'])) {
    $query = 'INSERT INTO promoes (owner, description, imagestring, date, parent) VALUES("' . $_SESSION['login']['id'] . '", "' . $_GET['name'] . '", "' . $_GET['imagestring'] . '", "';
    $query .= time() . '", "' . $_GET['parent'] . '")';
    mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
    jscript_location('?view=' . mysql_insert_id());
}
if (isset($_GET['search'])) {
    $query = 'SELECT p.id, p.owner AS author_id, p.imagestring, p.date, l.username AS author_username ';
    $query .= 'FROM promoes AS p, login AS l WHERE p.description LIKE "' . $_GET['search'] . '" AND l.id = p.owner ORDER BY p.id ASC LIMIT 100';
    $result = mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
    if (mysql_num_rows($result) > 1) {
        while ($promoe = mysql_fetch_assoc($result)) {
            $promoes[] = $promoe;
        }
        echo promoe_thumbs_list('Sökresultat: ' . $_GET['search'], $promoes);
    }
}
if (isset($_GET['view'])) {
    $query = 'SELECT p.id, p.owner AS author_id, p.imagestring, p.date, p.description, p.parent, l.username AS author_username ';
    $query .= 'FROM promoes AS p, login AS l WHERE p.id = "' . $_GET['view'] . '" AND l.id = p.owner ORDER BY p.id ASC';
    $result = mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
开发者ID:Rojk,项目名称:hamsterpaj,代码行数:31,代码来源:promoe.php

示例10: intval

                $queries[] = 'UPDATE ' . WALLPAPERS_RES_RELATION . ' SET is_removed = 1 WHERE pid = ' . intval($_GET['id']);
                $queries[] = 'UPDATE ' . WALLPAPERS_TAGS . ' SET is_removed = 1 WHERE pid = ' . intval($_GET['id']);
                foreach ($queries as $query) {
                    mysql_query($query) or report_sql_error($query, __FILE__, __LINE__);
                }
                //unlink files too!
                $unlink[] = intval($_GET['id']) . '_preview.' . $extension;
                $unlink[] = intval($_GET['id']) . '_thumb.' . $extension;
                foreach ($unlink as $delete) {
                    if (file_exists(UPLOAD_PATH . $delete)) {
                        !unlink(UPLOAD_PATH . $delete) ? jscript_alert('Kunde inte radera ' . $delete) : '';
                    } else {
                        jscript_alert('Filen ' . $delete . ' finns inte!');
                    }
                }
                jscript_location('bakgrundsbilder.php');
            } else {
                jscript_alert('Bilden finns inte. Återvänder...');
                jscript_go_back();
            }
            break;
    }
}
if (!$show_all_res) {
    $options['type'] = 'notification';
    $options['title'] = 'Visar alla bakgrunder';
    $options['message'] = 'Klicka <a href="?action=showall&val=true" title="Klicka här om du vill visa bilder som bara passar din upplösning">här</a> om du vill välja bilder anpassade till din skärm.';
    echo ui_server_message($options);
} else {
    $options['type'] = 'notification';
    $options['title'] = 'Visar bakgrundsbilder anpassade för din skärm';
开发者ID:KuBe-zz,项目名称:hamsterpaj,代码行数:31,代码来源:bakgrundsbilder.php

示例11: array

 case 'copy':
     if (login_checklogin()) {
         $copy_items = array();
         foreach ($_POST as $key => $value) {
             if (preg_match('/^copy_item_([0-9]+)$/', $key, $matches)) {
                 $copy_items[] = '(' . $matches[1] . ', ' . $_SESSION['login']['id'] . ')';
             }
         }
         if (count($copy_items) > 0) {
             $query = 'INSERT INTO user_lists_users(list_id, user_id)' . ' VALUES ' . implode(', ', $copy_items);
             mysql_query($query) or report_sql_error($query);
             jscript_alert('Kopierat, du kan nu hitta sakerna du kopierade på din lista!');
         } else {
             jscript_alert('Fel: Du valde inget att kopiera!');
         }
         jscript_location('/traffa/user_lists.php');
     }
     break;
 default:
     $query = 'SELECT li_t.list_text AS text, li_u.checked AS checked, li_t.list_text_id AS id' . ' FROM user_lists_texts AS li_t, user_lists_users AS li_u' . ' WHERE li_u.user_id = ' . $show_user . ' AND li_t.list_text_id = li_u.list_id';
     $result = mysql_query($query) or report_sql_error($query);
     if (mysql_num_rows($result) > 0) {
         echo '<h1>Visar lista för ' . $username . '</h1>' . "\n";
         if (login_checklogin()) {
             echo '<form method="post" action="/traffa/user_lists.php?action=' . ($_SESSION['login']['id'] == $show_user ? 'delete' : 'copy') . '" method="post">' . "\n";
         }
         echo '<ul class="user_lists_list">' . "\n";
         while ($data = mysql_fetch_assoc($result)) {
             $extra = login_checklogin() && $_SESSION['login']['id'] == $show_user ? '<input type="checkbox" name="delete_item_' . $data['id'] . '" id="delete_item_' . $data['id'] . '_checkbox" /> <label for="delete_item_' . $data['id'] . '_checkbox">Ta bort</label>' : '<input type="checkbox" name="copy_item_' . $data['id'] . '" id="copy_item_' . $data['id'] . '_checkbox" /> <label for="copy_item_' . $data['id'] . '_checkbox">Kopiera</label>';
             echo "\t" . '<li class="' . $data['checked'] . '">' . $data['text'] . '</li>' . "\n";
             echo "\t" . '<li class="options">' . (login_checklogin() ? $extra : ' ') . '</li>' . "\n";
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:user_lists.php

示例12: privilegies

     break;
 case 'add_privilegie':
     if (isset($_POST['user_id'], $_POST['privilegie_add_privilegie'], $_POST['privilegie_add_value']) && is_numeric($_POST['user_id']) && in_array($_POST['privilegie_add_privilegie'], $available_privilegies) && $_POST['privilegie_add_value'] != '') {
         $query = 'INSERT INTO privilegies (privilegie, value, user) VALUES ("' . $_POST['privilegie_add_privilegie'] . '", "' . $_POST['privilegie_add_value'] . '", ' . $_POST['user_id'] . ')';
         mysql_query($query) or report_sql_error($query);
         jscript_alert('OBS! Användaren måste logga ut och in innan privilegien blir satt!');
         jscript_location($_SERVER['PHP_SELF'] . '?action=load_user&user_id=' . $_POST['user_id']);
         exit;
     }
     break;
 case 'remove_privilegie':
     if (isset($_GET['privilegie_id'], $_GET['back_to_user_id']) && is_numeric($_GET['privilegie_id']) && is_numeric($_GET['back_to_user_id'])) {
         $query = 'DELETE FROM privilegies WHERE privilegie_id = ' . $_GET['privilegie_id'] . ' LIMIT 1';
         mysql_query($query) or report_sql_error($query);
         jscript_alert('OBS! Användaren måste logga ut och in innan privilegien tas bort. Du kan logga ut användaren genom Profil > Fakta > Logga ut användare om det är nödvändigt!');
         jscript_location($_SERVER['PHP_SELF'] . '?action=load_user&user_id=' . $_GET['back_to_user_id']);
         exit;
     }
     break;
 case 'view_users_by_privilegie':
     $output .= '<h2>Listar användare med privilegien ' . $_GET['privilegie'] . '</h2>' . "\n";
     $output .= rounded_corners_top(array('color' => 'blue_delux', 'return' => true));
     if (in_array($_GET['privilegie'], $available_privilegies)) {
         $query = 'SELECT l.username AS username, l.id AS user_id';
         $query .= ' FROM login AS l, privilegies AS pl';
         $query .= ' WHERE pl.user = l.id AND pl.privilegie = "' . $_GET['privilegie'] . '"';
         $result = mysql_query($query) or return_sql_error($query, __FILE__, __LINE__);
         if (mysql_num_rows($result) > 0) {
             $output .= '<ul>' . "\n";
             while ($data = mysql_fetch_assoc($result)) {
                 $output .= '<li><a href="' . $_SERVER['PHP_SELF'] . '?action=load_user&user_id=' . $data['user_id'] . '">' . $data['username'] . '</a> (<a href="/traffa/profile.php?user_id=' . $data['user_id'] . '">till profil &raquo;</a>)</li>' . "\n";
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:privilegies_admin.php

示例13: mysql_query

                mysql_query($query) or die(report_sql_error($query));
            }
        }
        jscript_location($_SERVER['PHP_SELF']);
        break;
    case 'admin_check':
        if (is_privilegied('groups_superadmin')) {
            group_admin_check($_GET['groupid']);
        }
        break;
    case 'check_ok':
        if (is_privilegied('groups_superadmin')) {
            group_check_ok($_GET['groupid']);
        }
        break;
    case 'remove_post':
        $auth = group_check_admin_auth($_GET['groupid']);
        if ($auth || is_privilegied('groups_superadmin')) {
            group_remove_post($_GET['groupid'], $_GET['postid']);
            jscript_alert('Inlägget borttaget');
        }
        jscript_location($_SERVER['PHP_SELF'] . '?action=goto&groupid=' . $_GET['groupid']);
        break;
    default:
        group_start_list();
}
ui_bottom();
ob_end_flush();
?>

开发者ID:Rojk,项目名称:hamsterpaj,代码行数:29,代码来源:groups.php

示例14: isset

            $out .= 'Inget IRL valt';
            break;
        }
        $out .= isset($_GET['updated']) ? '<span>Din IRL information har uppdateras. Klad Hest.</span>' : '';
        $out .= irl_attending(array('attending' => 'yes'));
        $out .= irl_attending(array('attending' => 'maybe'));
        $out .= irl_attending_form();
        $out .= rounded_corners_tabs_bottom(array('return' => TRUE));
        break;
    case "show":
    case "show_information":
        $irl_data = irl_fetch_information();
        $out .= irl_header($irl_data);
        $rounded_corners_tabs_options['return'] = TRUE;
        $rounded_corners_tabs_options['tabs'][] = array('href' => $paths_prefix . '?action=show_information&irl=' . $_GET['irl'] . '', 'label' => 'Information', 'current' => TRUE);
        $rounded_corners_tabs_options['tabs'][] = array('href' => $paths_prefix . '?action=show_attendings&irl=' . $_GET['irl'] . '', 'label' => 'Deltagare');
        $rounded_corners_tabs_options['tabs'][] = array('href' => $paths_prefix . $irl_data['forumthread_url'], 'label' => 'Forumtråd');
        $out .= rounded_corners_tabs_top($rounded_corners_tabs_options);
        $out .= nl2br($irl_data['information']);
        $out .= rounded_corners_tabs_bottom(array('return' => TRUE));
        break;
    case "update_attending":
        irl_update_attending($_POST);
        jscript_location('?action=show_attendings&irl=' . $_GET['irl'] . '&updated');
        break;
    default:
        $out .= 'Här ska det vara en lista över IRL' . "\n";
}
ui_top($ui_options);
echo $out;
ui_bottom();
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:irl.php

示例15: explode

            $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>
	#testlist
	{ 
		list-style-type:none;
		margin: 10px;;
		padding: 0px;
		list-style: none;
	}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:31,代码来源:photos-customize.php


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