Location: PHPKode > projects > OpenBizMap > obm2007.1/mydata/script/run_lock.txt
<?php
    header("Content-Type: text/plain; charset=UTF-8");

    addpath(cfg_data_path.'/temp/lock');

    $user=purename(get('user'));
    $sid=get('sid');

    if($sid)
    {
      if($sid=='99999999999999999999')
      {
        if(file_exists(cfg_data_path.'/temp/lock/lock_'.purename(USERNAME).'.txt'))
          unlink(cfg_data_path.'/temp/lock/lock_'.purename(USERNAME).'.txt');
      }
      else
      {
        $tmp_fp=fopen(cfg_data_path.'/temp/lock/lock_'.purename(USERNAME).'.txt','a');
        fwrite($tmp_fp,'"'.$sid.'",');
        fclose($tmp_fp);
      }
    }

    $tmp_content='';
    $res=opendir(cfg_data_path.'/temp/lock');
    while($fl = readdir($res))
      if(substr($fl,0,5)=='lock_' and $fl!='lock_'.$user.'.txt')
      {
        $tmp_content.=file_get_contents(cfg_data_path.'/temp/lock/'.$fl);
      }
    closedir($res);
    echo '['.$tmp_content.'""]';

  exit;
?>
Return current item: OpenBizMap