Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- 1: This source file is the "Very Real Peeps" Support (peeps-support.php) module from build "0-050j" of NenGame PHP.
- 2: "NenGame" is a scripting engine coordinated by Nick of Neinstar Filmz.
- 3: Nick's contact information is locatable via data:text/html=<style>url(http://neinstarfilmz.com/);</style>
- **/
- vrp_boot();
- function vrp_id($id=NULL)
- {
- global $nen;
- if(!is_dir($nen['root'].'/'.$nen['peeps']))
- mkdir($nen['root'].'/'.$nen['peeps']);
- if(is_string($id))
- {
- $pattern='([0-9]{14})((\+|\-)([0-9]{4}))\_([0-9]{8})';
- if(preg_match('/'.$pattern.'/',$id,$matches))
- if($matches[0]===$id)
- if(!is_file($nen['root'].'/'.$nen['peeps'].'/'.$id.'.ini'))
- $id=NULL;
- else
- $id=NULL;
- else
- $id=NULL;
- }
- if(is_null($id))
- {
- if(isset($_COOKIE['id']))
- $id=$_COOKIE['id'];
- else
- $id=NULL;
- if($id=NULL)
- {
- $id=date('YmdHisO');
- echo '<h1><tt>id:'.htmlentities($id).'</tt></h1>';
- $i=0;
- while(is_file($nen['root'].'/'.$nen['peeps'].'/'.$id.'_'.str_pad($i,8,'0',STR_PAD_LEFT).'.ini'))
- $i++;
- $id=$id.'_'.str_pad($i,8,'0',STR_PAD_LEFT);
- }
- setcookie('id',$id,time()+86400*365*15);
- }
- $nen['id']=$id;
- echo '<h1><tt>id:'.htmlentities($id).'</tt></h1>';
- return $id;
- }
- function vrp_boot()
- {
- global $nen,$nenini;
- if(isset($_COOKIE['id']))
- $id=vrp_id($_COOKIE['id']);
- else
- $id=vrp_id();
- $vrp=false;
- if(is_file($nen['root'].'/'.$nen['peeps'].'/'.$nen['id'].'.ini'))
- $vrp=nenscript_list_ini_load('/'.$nen['peeps'].'/'.$nen['id'].'.ini',"\r\n",'file');
- if(is_array($vrp))
- {
- $vrp['id']=$nen['id'];
- ksort($vrp);
- $temp=array();
- foreach($vrp as $key => $value)
- {
- $nen[$key]=$value;
- array_push($temp,'"'.$key.'"="'.$value.'"');
- }
- file_put_contents($nen['root'].'/'.$nen['peeps'].'/'.$nen['id'].'.ini',implode("\r\n",$temp));
- $nen['vrp']=$nen['id'];
- }
- else
- {
- $vrp=array('id'=>$nen['id']);
- ksort($vrp);
- $temp=array();
- foreach($vrp as $key => $value)
- {
- $nen[$key]=$value;
- array_push($temp,'"'.$key.'"="'.$value.'"');
- }
- file_put_contents($nen['root'].'/'.$nen['peeps'].'/'.$nen['id'].'.ini',implode("\r\n",$temp));
- $nen['vrp']=$nen['id'];
- }
- if(isset($_REQUEST['debug']))
- if($nen['vrp']!==false)
- {
- echo '<h1><tt>Very Real Peeps, New Model No."'.$nen['vrp'].'"</tt></h1>';
- echo '<p><tt>';
- if(is_array($vrp))
- foreach($vrp as $key => $value)
- echo '"'.htmlentities($key).'"="'.htmlentities($value).'"';
- else
- echo '<i>(empty)</i>';
- echo '</tt></p>';
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement