All pastes #30455 Raw Edit

Unnamed

public php v1 · immutable
#30455 ·published 2005-11-23 01:58 UTC
rendered paste body
<?phprequire_once 'global.php';/*  Page specific functions*/function genString($strlen = "32") {	$chars = range('a', 'z');	$nums = range(0, 9);	$str = substr(md5(microtime()), 5,10);	for($i = 0; $i < $strlen; $i++) {		if (($rand1 = round(rand(0,1))) == 1) {            $rand = rand(0, count($chars) - 1);            $str .= $chars[$rand];        }else{            $rand = rand(0, count($nums) - 1);            $str .= $nums[$rand];        }    }    return $str;}/*	End page specific functions	///////////////////////////	Begin Program*/if(isset($act))	{	$act = clean_string($act);	if( $act == 'register' ) {		$file = "".$tempPath."profileRegister".$tplEx."";		if(check_exist_file($file) == true) {			if(!isset($_POST['registration'])) {				$setTpl = new TemplatePower("$file"); 				$setTpl->prepare();				$array = array("name" => "val1", "name2" => "val2");				foreach ($array as $key => $value) {					$setTpl->assign($key, $value);				} 				$setTpl->printToScreen();			}			if(isset($_POST['registration'])) {				//...			}		}		else {			error("t", $file);		}	}}?>