Das habe ich bisher auch noch nicht gesehen
http://bugs.php.net/bug.php?id=50287
Voll der Bug oder?
Welcome to my world
Das habe ich bisher auch noch nicht gesehen
http://bugs.php.net/bug.php?id=50287
Voll der Bug oder?
xD mein Chef ist so eine Hohlbratze:
ich: die Software ist fertig
chef: Hast Du die auch getestet?
ich: ja auf XP, Vista und Windows 2000
chef: läuft die auf auf ‘nem Laptop?
1) She can fix your computer and make a website for your new startup.
2) She has friends who can fix your computer and design a database for you.
3) She can program your mother’s VCR and Tivo your favorite shows.
4) Her friends can program your mother’s VCR and Tivo your favorite shows
5) She can fix your friends’ computers.
6) She’ll make you shine wherever you go — how many of your friends are smart enough to date such a smart and useful woman?
7) She can pick out a the right cell phone/mp3 player/digital camera for you. Even better she can afford to buy it for you.
8) She’ll be so happy that someone appreciates her for her real talents, that she’ll adore you.
9) She won’t cheat either. Given a choice between George Clooney and the newest tech toy, she’ll take the toy.
10) Did I mention that she can fix your computer, make a website, design a database, install your cable modem and WiFi router, setup you iTunes for automatic download of your favorite artists, download your Outlook contacts onto the new cellphone/mp3 player/digital camera that she bought you?
11) And, she can cook dinner while doing all of the above.
< ?php $fa = new FeierAbend; $fa->arbeit_abschliessen(); $fa->daten_speichern(); $fa->pc_herunternfahren(); $fa->hole_fahrstuhl('mario'); $fa->wegfahren(); $fa->vollgas(); $fa->feierabend_bier(); ?>
User kommt zum Admin….
user: ich kann mit meinem MAC nicht mehr auf den server zufgreifen. Gestern vor dem Herunterfahren ging es noch….!
Admin: Ok, ich gucke alle Rechte von Dir an…
Admin: Das ist ein MAC Problem! Du hast alle Rechte wie die anderen und die 4 anderen MAC user können auch auf den server Zugriff nehmen.
User holt Chef dazu
Chef: Das muss laufen! Löscht den Account und legt den noch mal an!
Admin:…
crypt
#!/usr/bin/php < ?php require "crypt.php"; $type = $argv['1']; $string = $argv['2']; $key = $argv['3']; if($type !='' && $string != '' && $key != ''){ if($type=="e"){ echo encrypt($string,$key); echo "\n"; } elseif($type=="d") { echo decrypt($string,$key); echo "\n"; } else { die('WRONG TYPE'); } } else { echo 'crypt TYPE STRING KEY'; echo "\n\n"; echo "TYPE:\n"; echo "e encrypt\n"; echo "d decrypt\n"; echo "\n\n"; echo "STRING Your string\n"; echo "KEY Crypt key\n\n"; } ?>
crypt.php
< ?php /** * encrypt() * * @param mixed $string * @param mixed $key * @return mixed $retrun */ function encrypt($string, $key){ $result = ''; $lentgh = strlen($string); for($i = 0; $i < $lentgh; $i++) { $char = substr($string, $i, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char) + ord($keychar)); $result .= $char; } return base64_encode($result); } /** * decrypt() * * @param mixed $string * @param mixed $key * @return mixed $return */ function decrypt($string, $key){ $result = ''; $string = base64_decode($string); $lentgh = strlen($string); for($i = 0; $i < $lentgh; $i++) { $char = substr($string, $i, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char) - ord($keychar)); $result .= $char; } return $result; } ?>
Design ist wie Klopapier, im Prinzip für’n Arsch, but nice to have.
< ?php class login{ private $user = ''; private $pass = ''; /** * login::__construct() * @access public */ public function __construct(){ session_name('login'); session_start(); } /** * login::set_user() * @access public * @param string $user * @return */ public function set_user($user){ $this->user = $user; } /** * login::set_pass() * @access public * @param string $pass * @return */ public function set_pass($pass){ $this->pass = $pass; } /** * @access public * @return bool * @return redirect */ public function is_logged_in(){ if(isset($_SESSION['is_logged_in']) && $_SESSION['is_logged_in']== true){ return true; } return false; } /** * Löscht Cookie und Session * @access public */ public function do_logout(){ // Cookie clientseitig löschen if (isset ($_COOKIE[session_name ()])) { setcookie (session_name (), '', time ()-42000, '/'); } // Cookie serverseitig löschen session_destroy (); $_COOKIE = null; $_SESSION = null; } /** * Login function * @access public * @param string $user Bentuzername * @param string $password Passwort * @return bool */ public function do_login($user,$password){ if($user === $this->user && $password === $this->pass){ $_SESSION['is_logged_in'] = true; return true; } $_SESSION['is_logged_in'] = false; return false; } } ?>
< ?php require_once "../classes/login.class.php"; $login = new login(); $login->set_user('admin'); $login->set_pass('admin'); if(isset($_GET['logout']) && $_GET['logout']==1){ $login->do_logout(); } if(isset($_POST['user'])){ $login->do_login($_POST['user'],$_POST['pass']); } if($login->is_logged_in()== false){ echo 'logged out'; ?> < form action="" method="post" > User: < input type="text" name="user" value="" / >< br / > Pass: < input type="password" name="pass" value="" / >< br / > < input type="submit" value="login" / >
< /form > < ?php } else { echo 'logged in'; ?> < br / >< br / >< a href="?logout=1">Logout< /a > < ?php } ?> < br />< br />< a href="">Reload page< /a >
Yesterday I saw far away
There was a u-ship
Yeah it’s fire evening!
You are heavy on the wire