Beispiel #1
0
    <h1>Správa uživatelů</h1>
    <div style="border:#412617 solid 1px;padding:8px 10px 4px">
      {$u}
    </div>
EOL;
}
if (isset($_GET['a']) && $_GET['a'] == 'change_name') {
    if (empty($_GET['val']) || !($val = trim($_GET['val']))) {
        return;
    }
    if (empty($_GET['uid']) || !($login = trim($_GET['uid']))) {
        return;
    }
    strenc_todb($val);
    echo change_name($login, $val);
    exit;
} elseif (isset($_GET['a']) && $_GET['a'] == 'change_mail') {
    if (empty($_GET['val']) || !($val = trim($_GET['val']))) {
        return;
    }
    if (empty($_GET['uid']) || !($login = trim($_GET['uid']))) {
        return;
    }
    strenc_todb($val);
    echo change_mail($login, $val);
    exit;
} elseif (isset($_GET['a']) && $_GET['a'] == 'change_phone') {
    if (empty($_GET['val']) || !($val = trim($_GET['val']))) {
        return;
    }
        $newname = ucfirst(strtolower(trim($_POST['newname'])));
        $status = check_if_online($name, $CHDB);
        $newname_exist = check_if_name_exist($newname, $CHDB);
        if ($status == -1) {
            echo "<p align='center'><font color='red'>The character doesnt exsist
                </font></p>";
            exit();
        }
        if ($newname_exist == 1) {
            echo "<p align='center'><font color='red'>The character already exsists, please choose a different name!</font></p>";
            exit();
        }
    if ($status == 1)
        echo "<p align='center'><font color='red'>This character is online. Please try again later</font></p>";
    else {
            change_name($name, $newname, $CHDB, $DB);
			$DB->query("UPDATE `voting_points` SET `points`=(`points` - ".$char_rename_points."), `points_spent`=(`points_spent` + ".$char_rename_points.")
			WHERE id=?d",$account_id);
        echo "<p align='center'><font color='blue'>Success! Character " .$name." renamed to " .$newname. "</font></p>";
    }
}
?>
</td>
</tr>
</table>
</td></tr></table>
</td></tr></table>
</center>
<br />
<center>
<!-- CHARACTER RECUSOMTIZATION -->
Beispiel #3
0
<?php

class Brand
{
    var $name;
}
function change_name($drinkobj, $name)
{
    $drinkobj->name = $name;
}
$drink = new Brand();
$drink->name = 'Coke';
var_dump($drink->name);
change_name($drink, 'Pepsi');
echo "{$drink->name} the choice of a new generation\n";
Beispiel #4
0
function update($idPoll)
{
    change_name($idPoll);
    change_image($idPoll);
    change_privacy($idPoll);
}
Beispiel #5
0
     break;
 case "cancel_work":
     cancel_work(filter_input(INPUT_POST, 'action_id', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "change_description":
     change_description(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT), filter_input(INPUT_POST, 'description', FILTER_SANITIZE_STRING));
     break;
 case "change_documentation_status":
     change_documentation_status(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT), filter_input(INPUT_POST, 'status', FILTER_SANITIZE_STRING));
     break;
 case "change_due_date":
     echo "EX";
     change_due_date(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT), filter_input(INPUT_POST, 'due', FILTER_SANITIZE_STRING));
     break;
 case "change_name":
     change_name(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT), filter_input(INPUT_POST, 'new_name', FILTER_SANITIZE_STRING));
     break;
 case "change_power":
     change_power(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT), filter_input(INPUT_POST, 'new_power', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "change_quality":
     change_quality(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT), filter_input(INPUT_POST, 'new_quality', FILTER_VALIDATE_BOOLEAN));
     break;
 case "change_rank":
     change_rank(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT), filter_input(INPUT_POST, 'new_rank', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "change_todo_name":
     change_todo_name(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT), filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING));
     break;
 case "change_work_status_of_achievement":
     change_work_status_of_achievement(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT), filter_input(INPUT_POST, 'status', FILTER_SANITIZE_NUMBER_INT));
Beispiel #6
0
        show_signin();
        break;
    case "try-signin":
        try_signin();
        break;
    case "account":
        show_account();
        break;
    case "create":
        create_account();
        break;
    case "signout":
        signout();
        break;
    case "change-name":
        change_name();
        break;
    case "change-password":
        change_password();
        break;
    default:
        show_404();
}
function show_signin()
{
    if (is_auth()) {
        redirect("home");
    }
    render("signin");
}
function try_signin()
Beispiel #7
0
EOL;
        $content .= xmltransform(getXmlNapojak(), XSLT_NAPOJAK_EDIT);
    } else {
        $content .= xmltransform(getXmlNapojak(), XSLT_NAPOJAK);
    }
    return $content;
}
if (isset($_GET['chng_vis'])) {
    echo change_visibility($_GET['chng_vis'], $_GET['en']);
} else {
    if (isset($_GET['chng_name'])) {
        if (empty($_GET['val']) || !($val = trim($_GET['val']))) {
            return;
        }
        strenc_todb($val);
        echo change_name($_GET['chng_name'], $val);
    } else {
        if (isset($_GET['chng_desc'])) {
            if (empty($_GET['val']) || !($val = trim($_GET['val']))) {
                return;
            }
            strenc_todb($val);
            echo change_desc($_GET['chng_desc'], $val);
        } else {
            if (isset($_GET['chng_price'])) {
                if (empty($_GET['val']) || !($val = trim($_GET['val']))) {
                    return;
                }
                strenc_todb($val);
                echo change_price($_GET['chng_price'], $val);
            } else {