Размер файла: 2.36Kb
- <?php
- $query3=strtolower(rus2tr(utf2cyr($query3)));
-
- $fname=explode('.',$query3);
- $name=$fname[0];
- $ext=$fname[1];
- if ($ext=='wml') $query3=$name;
-
- if ($query3!='')
- {
- if ((strlen(trim(strtr(strtr(trim($query3),' ','^'),'0123456789-_abcdefghjiklmnopqrstuvwxyz',' ')))!=0)||(strlen($param1)>16))
- {
- print $head.cyr2utf('<card id="main" title="Копировать"><p>'.
- '<b>'.$param1.'.wml - недопустимое имя файла</b> <br/> <br/>'.
- '<b>'.$editfile.' копировать в:</b><br/>'.
- '<input name="pg'.$nocache.'" type="text" title="Новое имя" value="file'.$i.'" maxlength="16"/><br/>'.
- '<a href="http://wap.kmx.ru/?'.$id.'/pm'.$dmpage.$mpage.'/'.$editfile.'/copy/$(pg'.$nocache.')//'.$nocache.'">Переименовать</a> <br/>'.
- '<a href="http://wap.kmx.ru/?'.$id.'/pm'.$dmpage.$mpage.'/'.$editfile.'">Отмена</a>'.
- '</p></card></wml>');
- exit;
- }
-
- if ($query5!='') $nocache_=$query5+0;
- $fp = @fopen ($userpath."opeation.cache", "r");$testcache = trim(@fgets($fp, 10));@fclose ($fp);
- if ($nocache_!=$testcache)
- {
- if (file_exists($userpath.$currentdir.$query3.'.wml') && ($query4!='rewrite'))
- {
- print $head.cyr2utf('<card id="main" title="Копировать"><p>'.
- '<b>Файл '.$param1.'.wml уже существует, заменить?</b><br/>'.
- '<a href="http://wap.kmx.ru/?'.$id.'/pm'.$dmpage.$mpage.'/'.$editfile.'/copy/'.$param1.'/rewrite/'.$nocache.'">Заменить</a> <br/> <br/>'.
- '<b>'.$editfile.' копировать в:</b><br/>'.
- '<input name="pg'.$nocache.'" type="text" title="Новое имя" value="file'.$i.'" maxlength="16"/><br/>'.
- '<a href="http://wap.kmx.ru/?'.$id.'/pm'.$dmpage.$mpage.'/'.$editfile.'/copy/$(pg'.$nocache.')//'.$nocache.'">Переименовать</a> <br/>'.
- '<a href="http://wap.kmx.ru/?'.$id.'/pm'.$dmpage.$mpage.'/'.$editfile.'">Отмена</a>'.
- '</p></card></wml>');
- exit;
- }
-
- if ((!file_exists($userpath.$currentdir.$query3.'.wml')) || (file_exists($userpath.$currentdir.$query3.'.wml') && ($query4=='rewrite')))
- {
- @unlink($userpath.$currentdir.$query3.'.wml');
- @copy($userpath.$currentdir.$editfile.'.wml',$userpath.$currentdir.$query3.'.wml');
- @chmod($userpath.$currentdir.$query3.'.wml',0777);
- $fp = fopen ($userpath."opeation.cache", "w+");fwrite ($fp, $nocache_);fclose ($fp);
- }
- }
-
- $editfile=$query3;
- $action=$query2='';
- include($buildpath.'page_menu.php');
- exit;
- }
- ?>