4 /* Admin page for NP_SkinFiles */
5 /* ------------------------------------ */
6 /* A simple skin files manager */
8 /* code by Jeff MacMichael */
9 /* http://gednet.com/ */
13 $strRel = '../../../';
14 include($strRel . 'config.php');
16 include($DIR_LIBS . 'PLUGINADMIN.php');
18 if (preg_match("/MD$/", $nucleus['version'])) {
19 $isblogadmin = $member->isBlogAdmin(-1);
21 $isblogadmin = $member->isBlogAdmin($blogid);
23 if (!($member->isAdmin() || $isblogadmin)) {
24 $oPluginAdmin = new PluginAdmin('SkinFiles');
25 $oPluginAdmin->start();
26 echo "<p>"._ERROR_DISALLOWED."</p>";
31 // set to FALSE for normal operation, or TRUE if skins are stored
32 // under owner's member id i.e. /skins/1/grey/... (MDNucleus)
33 $privateskins = FALSE;
36 $SKINSUBDIR = $member->getID().'/';
37 $latestskins = 'latest-skins/';
42 global $pluginsskinfiles, $CONF;
43 $pluginsskinfiles=$CONF['PluginURL']."skinfiles";
45 if (isset($_GET['action'])) {$action = $_GET['action'];}
46 if (isset($_POST['action'])) {$action = $_POST['action'];}
48 if ($action == 'download') {
54 // create the admin area page
55 $oPluginAdmin = new PluginAdmin('SkinFiles');
56 $oPluginAdmin->start();
58 echo "<h2>Skin File Management</h2>";
60 if (strstr('renfile delfile createdir rendir deldir deleteAllInDir'
61 .' editfile uploadfile createfile getLatestSkins', $action)) {
62 call_user_func($action);
71 function createfile() {
72 global $oPluginAdmin, $DIR_SKINS, $SKINSUBDIR, $pluginsskinfiles;
73 $parent = $_POST["dir"];
74 $filename = $_POST["filename"];
75 $fullpath = $DIR_SKINS.$SKINSUBDIR.$parent.'/'.$filename;
76 if (file_exists($fullpath)) {
77 $msg = "Error: the file '$filename' already exists.";
80 echo "<h3><b>Creating file \"/$parent/$filename\":</b></h3>";
81 $errrep = error_reporting(E_ERROR);
82 if (touch($fullpath)) {
83 $msg = 'The file was created successfully.';
85 $msg = 'ERROR: The file was <i>not</i> created successfully.';
87 $oldumask = umask(0000);
88 chmod($fullpath, 0755);
90 error_reporting($errrep);
94 function createdir() {
95 global $oPluginAdmin, $DIR_SKINS, $SKINSUBDIR, $pluginsskinfiles;
96 $parent = $_POST["dir"];
97 $newdir = $_POST["newdir"];
99 echo 'You need to specify a directory name to create. <br /><br />';
100 echo '> <a href="'.$_SERVER['HTTP_REFERER'].'">Go back</a><br />';
103 $errrep = error_reporting(E_ERROR);
104 $oldumask = umask(0000);
105 if (mkdir ($DIR_SKINS.$SKINSUBDIR.$parent.'/'.$newdir, 0755)) {
106 $msg = 'Directory created successfully.';
108 $msg = 'There was an error creating the directory (check to see if the directory already exists).';
111 error_reporting($errrep);
115 function download() {
116 global $DIR_SKINS, $SKINSUBDIR;
117 $file = $_GET["rfp"];
118 $path = $DIR_SKINS.$SKINSUBDIR.$file;
119 $splitpath = preg_split( "/\//", strrev($_GET["rfp"]), 2);
120 $file = strrev($splitpath[0]);
122 // download code taken from Paul Alger's PHP_Easy_Download.
124 // translate file name properly for Internet Explorer.
125 if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")){
126 $file = preg_replace('/\./', '%2e', $file, substr_count($file, '.') - 1);
128 // make sure the file exists before sending headers
129 if(!$fdl=@fopen($path,'r')){
130 die("Cannot Open File!");
132 header("Cache-Control: ");// leave blank to avoid IE errors
133 header("Pragma: ");// leave blank to avoid IE errors
134 header("Content-type: application/octet-stream");
135 header('Content-Disposition: attachment; filename="'.$file.'"');
136 header("Content-length: ".(string)(filesize($path)));
145 function uploadfile() {
146 global $HTTP_POST_FILES, $DIR_SKINS, $SKINSUBDIR, $pluginsskinfiles, $CONF;
147 $filename = $HTTP_POST_FILES['filename']['name'];
148 $filesize = $HTTP_POST_FILES['filename']['size'];
149 $filetempname = $HTTP_POST_FILES['filename']['tmp_name'];
150 $todir = $DIR_SKINS.$SKINSUBDIR.$_POST['dir'].'/';
152 if ($filesize > $CONF['MaxUploadSize']) {
153 showdir(_ERROR_FILE_TOO_BIG);
157 // check file type against allowed types
159 $allowedtypes = explode (',', "css,html,htm,xml,inc,txt,".$CONF['AllowedTypes']);
160 foreach ( $allowedtypes as $type )
161 if (eregi("\." .$type. "$",$filename)) $ok = 1;
163 showdir(_ERROR_BADFILETYPE);
166 if (!is_uploaded_file($filetempname)) {
167 showdir(_ERROR_BADREQUEST);
170 if (file_exists($todir.$filename)) {
171 showdir(_ERROR_UPLOADDUPLICATE);
175 // move file to directory
176 if (is_uploaded_file($filetempname)) {
177 $errrep = error_reporting(E_ERROR);
178 if (!@move_uploaded_file($filetempname, $todir . $filename)) {
179 showdir(_ERROR_UPLOADMOVE);
182 error_reporting($errrep);
184 // chmod uploaded file
185 $oldumask = umask(0000);
186 @chmod($todir . $filename, 0755);
189 showdir("File uploaded successfully.");
193 global $DIR_SKINS, $SKINSUBDIR, $pluginsskinfiles;
194 if (isset($_POST['newname'])) {
195 $splitpath = preg_split( "/\//", strrev($_POST["oldname"]), 2);
196 $newname = strrev($splitpath[1]) .'/'. $_POST["newname"];
197 $newname = preg_replace("/^\//", "", $newname);
198 $res = rename ( $DIR_SKINS.$SKINSUBDIR.$_POST["oldname"],
199 $DIR_SKINS.$SKINSUBDIR.$newname);
201 $msg = "Directory successfully renamed.";
203 $msg = "Failed to rename directory - (check to see if another directory already exists with the new name).";
207 $oldname = preg_replace("/^\//", "", $_GET["oldname"]);
208 echo '<h3><b>Rename directory "/'.$oldname.'":</b></h3>';
209 $splitpath = preg_split( "/\//", strrev($_GET["oldname"]), 2);
210 $dir = strrev($splitpath[0]);
211 $parent = strrev($splitpath[1]);
212 echo '> <a href="'.$_SERVER['HTTP_REFERER'].'">Cancel rename</a><br />';
214 <form method="post" action="<?php echo $pluginsskinfiles?>/">
215 <input type="hidden" name="action" value="rendir" />
216 <input type="hidden" name="dir" value="<?php echo "/$parent" ?>"/>
217 <input type="hidden" name="oldname" value="<?php echo $oldname?>"/>
219 <td><?php echo 'Rename to'?></td>
220 <td><input name="newname" tabindex="90" value="<?php echo htmlspecialchars($dir) ?>" maxlength="50" size="20" /></td>
222 <td><?php echo "Rename"?></td>
223 <td><input type="submit" tabindex="140" value="<?php echo "Rename this folder"?>" onclick="return checkSubmit();" /></td>
230 function editfile () {
231 global $DIR_SKINS, $SKINSUBDIR, $pluginsskinfiles;
232 if (isset ($_POST['rfp']) && isset($_POST['content'])) {
233 $file = $_POST['rfp'];
234 $errrep = error_reporting(E_ERROR);
236 if ($fh = @fopen($DIR_SKINS.$SKINSUBDIR.$file, 'w')) {
237 if (fwrite ($fh, trim(stripslashes($_POST['content'])))) {
245 error_reporting($errrep);
247 $msg = 'File was edited successfully.';
249 $msg = 'ERROR: File was <i>not</i> saved successfully.';
252 if (isset ($_GET['rfp'])) { $file = $_GET['rfp']; }
253 if (isset ($_POST['rfp'])) { $file = $_POST['rfp']; }
254 $splitpath = preg_split( "/\//", strrev($file), 2);
255 $parent = strrev($splitpath[1]);
256 echo '<h3>Editing file "/'.$file.'":</h3>';
257 if (isset($msg)) { echo "<p><b>$msg</b></p>"; }
258 echo "> <a href=\"$pluginsskinfiles/?dir=$parent\"> Cancel/Return to /$parent</a><br /><br />";
259 $fh = @fopen($DIR_SKINS.$SKINSUBDIR.$file, 'r');
261 $content .= fread($fh, 4096);
265 <form method="post" action="<?php echo $pluginsskinfiles?>/">
266 <input type="hidden" name="action" value="editfile" />
267 <input type="hidden" name="rfp" value="<?php echo $file ?>"/>
268 <input type="hidden" name="dir" value="<?php echo $parent ?>"/>
269 <input type="submit" tabindex="140" value="<?php echo "Save changes"?>" onclick="return checkSubmit();" />
270 <input type="reset" value="Reset Data" /><br />
271 <textarea class="skinedit" tabindex="8" rows="20" cols="80" name="content"><?PHP echo htmlspecialchars($content) ?></textarea>
272 <input type="submit" tabindex="140" value="<?php echo "Save changes"?>" onclick="return checkSubmit();" />
273 <input type="reset" value="Reset Data" /><br />
280 global $DIR_SKINS, $SKINSUBDIR, $pluginsskinfiles;
281 if (isset($_POST['newname'])) {
282 $splitpath = preg_split( "/\//", strrev($_POST["oldname"]), 2);
283 $newname = strrev($splitpath[1]) .'/'. $_POST["newname"];
284 $newname = preg_replace("/^\//", "", $newname);
285 $res = rename ( $DIR_SKINS.$SKINSUBDIR.$_POST["oldname"],
286 $DIR_SKINS.$SKINSUBDIR.$newname);
288 $msg = "File successfully renamed.";
290 $msg = "File could not be renamed - (check to see if another file already exists with the new name).";
294 echo '<h3><b>Rename file "/'.$_GET["rfp"].'":</b></h3>';
295 $splitpath = preg_split( "/\//", strrev($_GET["rfp"]), 2);
296 $file = strrev($splitpath[0]);
297 $parent = strrev($splitpath[1]);
298 echo '> <a href="'.$_SERVER['HTTP_REFERER'].'">Cancel rename</a><br />';
300 <form method="post" action="<?php echo $pluginsskinfiles?>/">
301 <input type="hidden" name="action" value="renfile" />
302 <input type="hidden" name="oldname" value="<?php echo $_GET["rfp"] ?>"/>
303 <input type="hidden" name="dir" value="<?php echo "/$parent" ?>"/>
305 <td><?php echo 'Rename to'?></td>
306 <td><input name="newname" tabindex="90" value="<?php echo htmlspecialchars($file) ?>" maxlength="50" size="20" /></td>
308 <td><?php echo "Rename"?></td>
309 <td><input type="submit" tabindex="140" value="<?php echo "Rename this file"?>" onclick="return checkSubmit();" /></td>
317 global $DIR_SKINS, $SKINSUBDIR, $pluginsskinfiles;
318 if (isset($_GET['sure'])) {
319 $file = $DIR_SKINS.$SKINSUBDIR.$_GET["rfp"];
320 $errrep = error_reporting(E_ERROR);
321 if (unlink ($file)) {
322 $msg = 'File "'.$_GET["rfp"].'" has been deleted.';
324 $msg = 'ERROR: File "'.$_GET["rfp"].'" could not be deleted.';
326 error_reporting($errrep);
329 $file = $DIR_SKINS.$SKINSUBDIR.$_GET["rfp"];
330 $splitpath = preg_split( "/\//", strrev($_GET["rfp"]), 2);
331 $parent = strrev($splitpath[1]);
332 echo '<h3><b>Delete file "'.$_GET["rfp"].'": are you sure?</b></h3>';
333 echo '<b>This action cannot be undone!</b><br /><br />';
334 echo "> <a href=\"$pluginsskinfiles/?action=delfile&dir=$parent&sure=y&rfp=".$_GET["rfp"]."\">Yes, delete the file.</a><br />";
335 echo "> <a href=\"$pluginsskinfiles/?dir=".$parent.'">No, go back.</a><br />';
340 global $DIR_SKINS, $SKINSUBDIR, $pluginsskinfiles;
341 if (isset($_GET['sure'])) {
342 $dir = $DIR_SKINS.$SKINSUBDIR.$_GET["remdir"];
343 $errrep = error_reporting(E_ERROR);
345 $msg = 'Directory "'.$_GET["remdir"].'" has been deleted.';
347 $msg = 'ERROR: directory "'.$_GET["remdir"].'" could not be deleted - (check to see if it contains files).';
349 error_reporting($errrep);
352 $dir = preg_replace("/^\//", "",$_GET['remdir']);
353 $parent = $_GET['dir'];
354 echo '<h3><b>Delete directory "/'.$dir.'": are you sure?</b></h3>';
355 echo '<b>This action cannot be undone!</b><br /><br />';
356 echo "> <a href=\"$pluginsskinfiles/?action=deldir&sure=y&remdir=$dir&dir=$parent\">Yes, delete the directory (it must be empty to do this).</a><br /><br />";
357 echo "> <a href=\"$pluginsskinfiles/?dir=".$parent.'">No, go back.</a><br />';
361 function deleteAllInDir() {
362 global $DIR_SKINS, $SKINSUBDIR, $pluginsskinfiles;
363 $parent = $DIR_SKINS.$SKINSUBDIR.preg_replace("/^\//", "",$_GET['dir']);
364 if ($dh = @opendir($parent)) {
365 while (($file = readdir($dh)) !== false) {
366 if(!preg_match("/^\.{1,2}/", $file)){
367 if (!is_dir($parent.$file)) {
374 if (isset($_GET['sure'])) {
375 $errrep = error_reporting(E_ERROR);
376 echo '<h3>Deletion results</h3><table>';
377 echo "> <a href=\"$pluginsskinfiles/?dir=".$_GET["dir"]."\">Return to the /".$_GET["dir"]." directory.</a><br />";
378 foreach ($files as $file) {
379 if (unlink ("$parent/$file")) {
380 echo "<tr><td>File: $file was deleted.</td></tr>";
382 echo "<tr><td>File: $file was <b>NOT</b> deleted.</td></tr>";
386 error_reporting($errrep);
387 echo "> <a href=\"$pluginsskinfiles/?dir=".$_GET["dir"]."\">Return to the /".$_GET["dir"]." directory.</a><br />";
389 echo '<h3><b>Delete all files in directory "/'.$_GET['dir'].'": are you sure?</b></h3>';
390 echo '<b>This action cannot be undone!</b><br /><br />';
391 echo "> <a href=\"$pluginsskinfiles/?action=deleteAllInDir&sure=y&dir=".$_GET["dir"]."\">Yes, delete <u>all files</u> in this directory.</a><br />";
392 echo "> <a href=\"$pluginsskinfiles/?dir=".$_GET['dir'].'">No, go back.</a><br /><br />';
393 echo '<b>Files list:</b><table>';
394 foreach ($files as $file) { echo "<tr><td>$file</td></tr>"; }
399 // function for MDNucleus; won't work unless $privateskins is set to true
400 function getLatestSkins() {
401 global $DIR_SKINS, $pluginsskinfiles, $privateskins, $latestskins, $member;
402 $confirmed = $_POST['overwrite'];
404 showdir("Overwrite of default skin files not confirmed - no action taken.");
407 if ($dh = @opendir($DIR_SKINS.$latestskins)) {
408 while (($file = readdir($dh)) !== false) {
409 if(!preg_match("/^\.{1,2}/", $file))
410 if (is_dir($DIR_SKINS.$latestskins.$file)) $skins[] = $file;
415 $msg = "Refreshed skin folders:";
417 foreach ($skins as $skin) {
418 $memberskin = $DIR_SKINS.$member->getID().'/'.$skin;
419 if (is_file($memberskin)) unlink($memberskin);
420 if (!is_dir($memberskin)) {
421 $old_umask = umask(0);
422 mkdir($memberskin, 0755);
425 exec("rsync -Wtr --delete ".$DIR_SKINS.$latestskins.$skin."/* ".$memberskin.'/');
429 showdir("No default skin folders found. No action taken.");
435 function _isImageFile($file) {
436 return preg_match ("/\.(gif|png|jpg|jpeg|bmp|ico)$/i", $file);
439 function _isEditableFile($file) {
440 return preg_match ("/\.(inc|txt|htm|html|xml)$/i", $file);
443 function showdir($msg = '') {
444 global $DIR_SKINS, $SKINSUBDIR, $pluginsskinfiles, $CONF;
445 global $privateskins, $latestskins;
446 if (isset($_GET['dir'])) {
447 $newdir = preg_replace("/^\//", "",$_GET['dir']);
448 $currdir = $DIR_SKINS.$SKINSUBDIR."$newdir/";
450 } elseif (isset($_POST['dir'])) {
451 $newdir = preg_replace("/^\//", "",$_POST['dir']);
452 $currdir = $DIR_SKINS.$SKINSUBDIR."$newdir/";
456 $currdir = $DIR_SKINS.$SKINSUBDIR;
460 if ($privateskins && (!is_dir($DIR_SKINS.$SKINSUBDIR))) {
461 $oldumask = umask(0);
462 mkdir($DIR_SKINS.$SKINSUBDIR, 0755);
466 if (!is_dir($currdir)) {
467 echo 'The specified location is not a directory or doesn\'t exist.';
471 if ($dh = @opendir($currdir)) {
472 while (($file = readdir($dh)) !== false) {
473 if(!preg_match("/^\.{1,2}/", $file)){
474 if (is_dir($currdir.$file)) {
484 echo "<h3>Current Directory: <b>/$newdir</b></h3>";
487 echo '<p><b>'.htmlspecialchars($msg).'</b></p>';
491 echo "<u><a href=\"$pluginsskinfiles/\">> Return to / <</a></u><br />";
492 if (strstr($newdir, '/')) {
493 $splitpath = preg_split( "/\//", strrev($newdir), 2);
494 $updir = strrev($splitpath[1]);
495 echo "<u><a href=\"$pluginsskinfiles/?dir=/$updir\">> Return to /$updir <</a></u><br /><br />";
498 echo "<u><a href=\"$pluginsskinfiles/?dir=$newdir\">> Refresh <</a></u><br />";
503 foreach($dirs as $dir) {
504 echo "<tr onmouseover='focusRow(this);' onmouseout='blurRow(this);'><td>";
505 echo " <a href=\"$pluginsskinfiles/?dir=$newdir/$dir\">";
506 echo "<img src=\"$pluginsskinfiles/dir.gif\"> $dir</a> </td>";
507 echo "<td> <a href=\"$pluginsskinfiles/?action=rendir&oldname=$newdir/$dir\" title=\"Rename directory\">(ren)</a></td>";
508 echo "<td> <a href=\"$pluginsskinfiles/?action=deldir&dir=$newdir&remdir=$newdir/$dir\" title=\"Delete directory\">(del)</a></td>";
509 echo "</td><td></td><td></td><td></td><td>";
510 echo "<td>".date('M d, Y h:i:s a', filemtime($DIR_SKINS.$SKINSUBDIR.$newdir."/$dir"));
515 if(is_array($files)){
517 foreach($files as $file) {
518 echo "<tr onmouseover='focusRow(this);' onmouseout='blurRow(this);'><td>";
520 if (preg_match("/\.css$/i", $file)) {
521 echo "<img src=\"$pluginsskinfiles/css.gif\"> ";
522 } elseif (preg_match("/\.php(3|4)?$/i", $file)) {
523 echo "<img src=\"$pluginsskinfiles/php.gif\"> ";
524 } elseif (_isEditableFile($file)) {
525 echo "<img src=\"$pluginsskinfiles/text.gif\"> ";
526 } elseif (_isImageFile($file)) {
527 echo "<img src=\"$pluginsskinfiles/image.gif\"> ";
529 echo "<img src=\"$pluginsskinfiles/generic.png\"> ";
531 if ($newdir == '') {$thisdir = '';} else {$thisdir = "$newdir/";}
534 echo " <a href=\"$pluginsskinfiles/?action=renfile&rfp=$thisdir"."$file\" title=\"Rename file\">(ren)</a>";
536 echo " <a href=\"$pluginsskinfiles/?action=delfile&rfp=$thisdir"."$file\" title=\"Delete file\">(del)</a>";
538 if ((is_writable($DIR_SKINS.$SKINSUBDIR.$thisdir.$file)) && (!_isImageFile($file))) {
539 echo " <a href=\"$pluginsskinfiles/?action=editfile&rfp=$thisdir"."$file\" title=\"Edit file\">(edit)</a>";
542 if (_isImageFile($file)) {
543 echo ' <a href="'.$CONF['SkinsURL'].$SKINSUBDIR.$thisdir."$file\" title=\"View graphic\">(view)</a>";
546 echo " <a href=\"$pluginsskinfiles/?action=download&rfp=$thisdir"."$file\" title=\"Download file\">(d/l)</a>";
548 echo number_format(filesize($DIR_SKINS.$SKINSUBDIR.$thisdir.$file)/1024, 2)." KB";
550 echo date('M d, Y h:i:s a', filemtime($DIR_SKINS.$SKINSUBDIR.$thisdir.$file));
556 if(is_array($dirs) || is_array($files)) {
558 echo "<u><a href=\"$pluginsskinfiles/\">> Return to / <</a></u><br />";
559 if (strstr($newdir, '/')) {
560 $splitpath = preg_split( "/\//", strrev($newdir), 2);
561 $updir = strrev($splitpath[1]);
562 echo "<u><a href=\"$pluginsskinfiles/?dir=/$updir\">> Return to /$updir <</a></u><br /><br />";
565 echo "<u><a href=\"$pluginsskinfiles/?dir=$newdir\">> Refresh <</a></u><br />";
569 echo "<h3>Create new file in <b>/$newdir</b></h3>";
571 <form method="POST" enctype="multipart/form-data" action="<?php echo $pluginsskinfiles ?>/">
572 <input type="hidden" name="action" value="createfile" />
573 <input type="hidden" name="dir" value="<?php echo $newdir ?>">
574 <input type="text" name="filename" size="40">
575 <input type="submit" value="<?php echo 'Create file' ?>" />
579 echo "<h3>Upload new file to <b>/$newdir</b></h3>";
581 <form method="POST" enctype="multipart/form-data" action="<?php echo $pluginsskinfiles ?>/">
582 <input type="hidden" name="action" value="uploadfile" />
583 <input type="hidden" name="dir" value="<?php echo $newdir ?>">
584 <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $CONF['MaxUploadSize']?>" />
585 <input type="file" name="filename" size="40">
586 <input type="submit" value="<?php echo _UPLOAD_BUTTON?>" />
591 echo "<h3>Delete all files in <b>/$newdir</b></h3>";
593 <form method="get" action="<?php echo $pluginsskinfiles?>/">
594 <input type="hidden" name="action" value="deleteAllInDir" />
595 <input type="hidden" name="dir" value="<?php echo $newdir?>"/>
596 <?php echo "Delete all Files? (will ask for confirmation)"?>
597 <input type="submit" tabindex="140" value="<?php echo "Delete All"?>" onclick="return checkSubmit();" />
603 echo "<h3>Create a new directory in <b>/$newdir</b></h3>";
605 <form method="post" action="<?php echo $pluginsskinfiles?>/">
606 <input type="hidden" name="action" value="createdir" />
607 <input type="hidden" name="dir" value="<?php echo $newdir?>"/>
608 <input name="newdir" tabindex="90" value="<?php echo 'newdir' ?>" size="40" />
609 <input type="submit" tabindex="140" value="<?php echo "Create"?>" onclick="return checkSubmit();" />
613 // for MDNucleus, ignored if on Win32 platform (for the moment)
614 if (($newdir == '') && ($privateskins) && (!strtoupper(substr(PHP_OS, 0,3) == 'WIN'))) {
615 if ($dh = @opendir($DIR_SKINS.$latestskins)) {
616 while (($file = readdir($dh)) !== false) {
617 if(!preg_match("/^\.{1,2}/", $file))
618 if (is_dir($DIR_SKINS.$latestskins.$file)) $skins[] = $file;
623 echo "<h3>Refresh default skin files to standard versions</h3>";
625 <form method="post" action="<?php echo $pluginsskinfiles?>/">
626 <input type="hidden" name="action" value="getLatestSkins" />
629 if (count($skins) > 1) {
630 $lastskin = array_pop($skins);
631 array_push($skins, "</b>and<b> $lastskin");
633 echo "This will overwrite or create files in the following skin file directories: <b>";
634 echo implode(", ", $skins)."</b><br /><br />";
636 Note that you may need to re-import skin definitions you wish to use (See Layout Import/Export).<br /><br />
637 <input type="checkbox" name="overwrite" value="1" id="cb_overwrite" />
638 <label for="cb_overwrite"><?php echo "Check this box to confirm overwrite of files<br />" ?></label>
639 <input type="submit" tabindex="140" value="<?php echo "Overwrite Default Skin Files"?>" onclick="return checkSubmit();" />