How to use writeHelp method of script class

Best Atoum code snippet using script.writeHelp

admin.php

Source:admin.php Github

copy

Full Screen

...326 <div class="clearer"></div>327 <div class="part" style="margin-top: 18px;">328 <div class="title">329 <a style="color: white" href="?page=welcome">Administration Region</a>330 <?php writeHelp("Administration Region"); ?>331 </div>332 <div class="inside">333 <?php334 parse_container('comments', 'Comment', 'data/comments.xml');335 $lastcmnt = (int)$comments['lastiid'];336 end($comments);337 if (isset($basis['lastcmntseen']) && ($lastcmnt > $basis['lastcmntseen'])) {338 $notseen = ($lastcmnt - $basis['lastcmntseen']);339 if ($notseen == 1)340 $notseen = "one";341 echo "<div class=\"method\"><div class=\"note_valid\">"342 ."<a href=\"?page=comments\">"343 ."&nbsp; &nbsp; You have $notseen new comment".(($notseen != "one")?"s":"")."!"344 ."&nbsp;<img class=\"logo\" width=\"39px\" height=\"21px\" src=\"files/adminfiles/logo_newcomment.gif\" />"345 ."</a></div></div><br />\n";346 }347 if (strlen($ok_msg))348 echo "<div class=\"method\"><div class=\"note_valid\">$ok_msg</div></div><br />\n";349 if (strlen($alert_msg))350 echo "<div class=\"method\"><div class=\"note_invalid\">$alert_msg</div></div><br />\n";351352 ?>353 <noscript>354 <div class="method"><div class="note_invalid">Please activate javascript for the proper performance.</div></div>355 <br />356 </noscript>357 <table width="100%" cellspacing="0" cellpadding="0" style="position: relative;"><tr>358 <td width="49%" valign="top">359 <div class="method">360 <span class="name"><span class="dot">&#149;</span>Manage Works:361 </span><br />362 <a href="?page=photos" ><img width="20px" height="20px" class="logo" src="files/adminfiles/logo_photos.gif" />Manage Photos</a>363 <span style="color: #789"> [ <a href="?page=photos&cmd=doAdd">Add</a> ]</span>364 <?php writeHelp("Manage Photos"); ?><br />365 <a href="?page=drafts" ><img width="20px" height="20px" class="logo" src="files/adminfiles/logo_drafts.gif" />Manage Drafts</a>366 <span style="color: #789"> [ <a href="?page=drafts&cmd=doUpload">Upload</a> ]</span>367 <?php writeHelp("Manage Drafts"); ?><br />368 <a href="?page=categories"><img width="20px" height="20px" class="logo" src="files/adminfiles/logo_categs.gif" />Manage Categories</a>369 <?php writeHelp("Manage Categories"); ?><br />370 <a href="?page=stories" ><img width="20px" height="20px" class="logo" src="files/adminfiles/logo_stories.gif" />Manage Stories</a>371 <?php writeHelp("Manage Stories"); ?><br />372 <a href="?page=comments" ><img width="20px" height="20px" class="logo" src="files/adminfiles/logo_comments.gif" />Manage Comments</a>373 <?php writeHelp("Manage Comments"); ?><br />374 </div>375 </td>376 <td width="49%" valign="top">377 <div class="method">378 <span class="name"><span class="dot">&#149;</span>Technical Settings:</span><br />379 <a href="?page=basis" ><img width="20px" height="20px" class="logo" src="files/adminfiles/logo_preferences.gif" />Adjust Preferences</a>380 <?php writeHelp("Adjust Preferences"); ?><br />381382 <a href="?page=configs" ><img width="20px" height="20px" class="logo" src="files/adminfiles/logo_configs.gif" />Advanced Configurations</a>383 <?php writeHelp("Advanced Configurations"); ?><br />384 <a href="?page=editxml" ><img width="20px" height="20px" class="logo" src="files/adminfiles/logo_xml.gif" />XML Editor</a>385 <?php writeHelp("XML Editor"); ?><br />386 <br style="margin-top: 6px;" />387 <a href="?page=logout" ><img width="20px" height="20px" class="logo" src="files/adminfiles/logo_logout.gif" />Log Out</a>388 <?php writeHelp("Log Out"); ?><br />389 </div>390 </td>391 </tr></table>392 </div>393 </div>394<?php395 }396397 if (page_is('wrong')) {398?>399 <div class="back2mainR"><a target="_blank" href=".">&nbsp;View Gallery &gt;&gt; </a></div>400 <div class="clearer" style="margin-top: 20px;"></div>401<?php402 $last_ver = GetLastPhormerVersion();403 $msg = "";404 $msg_color = "#C33";405406 if ($last_ver == "")407 $msg = "<b>Failed</b>: Unable to connect to <a href=\"http://p.horm.org/er\">Phormer</a> to check for available"408 ." updates!";409 else if (strcmp(trim(PHORMER_VERSION), trim($last_ver)) == 0) {410 $msg = "Great! You're running last version of <a href=\"http://p.horm.org/er\">Phormer</a>"411 .", which is ".PHORMER_VERSION."!";412 $msg_color = "#060";413 }414 else { //if (PHORMER_VERSION < $last_ver)415 $msg_color = "#933";416 $msg = "Your Phormer (ver ".PHORMER_VERSION.") is out of date, since the last version "417 ." is $last_ver.<br />"418 ." <a href=\"http://p.horm.org/er/faq/#update\">Update</a> at Phormer's homepage. "419 ."<b>Don't Hesitate -</b> It takes just 3 minutes!";420 }421?>422423 <div class="part">424 <div class="title"><a style="color: white" href="?">Welcome!</a></div>425 <div class="inside">426427 <div class="method" style="text-align: left">428 <span class="name"><a style="color: black" href="?">Login to Your Phormer</a></span>429 <form method="post" action="admin.php<?php if (strlen($goafterlogin)) echo "?page=$goafterlogin"; ?><?php if (isset($_GET['ignore'])) echo "&ignore=".$_GET['ignore']; ?>">430 <center>431 <?php if (strlen($alert_msg)) echo "<div class=\"note_invalid\">$alert_msg</div><br />"; ?>432 <?php if (strlen($ok_msg)) echo "<div class=\"note_valid\">$ok_msg</div><br />"; ?>433 Administrator's password: <div style="margin-bottom: 10px;" /></div>434 <input id="loginAdminPass" name="passwd" type="password" class="text" size="12"435 style="font-size: 2em; font-family: courier new, tahoma, helvetica, serif; font-weight: bold;"></input>436 <br /><br />437 <input class="submit" type="submit" value="&nbsp;&nbsp;&nbsp;Login&nbsp;&nbsp;&nbsp;"></input>438 </center>439 </form>440 </div>441442 <br /><br />443444 <div class="method" style="text-align: left; background: #E8F0F8">445 <span class="name"><a style="color: black" href="?">Update Your Phormer</a>446 <?php writeHelp("Update Message"); ?>447 </span>448 <div style="text-align: center; font-size: 1.0em; margin: 0px 0px 8px; ">449 <?php echo "<span style=\"color: $msg_color;\">$msg</span>"; ?>450 </div>451 </div>452453 </div>454 </div>455<?php456 }457458 if (page_is('uninstall')) {459 if (!isset($_GET['sure']))460 $_GET['sure'] = 0;461462 $ok_msg = "";463 $log_msg = "";464 if ($_GET['sure'] >= 2) {465 $dirs = array('temp', 'images/extraz', 'images', 'data', 'index.xml');466 foreach ($dirs as $dir) {467 if (is_dir($dir)) {468 if ($handle = opendir($dir)) {469 while (false !== ($file = readdir($handle)))470 if ($file != "." && $file != "..")471 unlink($dir."/".$file);472 closedir($handle);473 $log_msg .= "<span class=\"dot\">&#149;</span>Deleted all the files in &quot;<tt>$dir</tt>&quot; Directory.<br/ >\n";474 rmdir($dir);475 $log_msg .= "<span class=\"dot\">&#149;</span>Deleted &quot;<tt>$dir</tt>&quot; Directory.<br />\n";476 }477 } else478 if (file_exists($dir)) { // is file479 unlink($dir);480 $log_msg .= "<span class=\"dot\">&#149;</span>Deleted &quot;<tt>$dir</tt>&quot; File.<br />\n";481 }482 }483484 $ok_msg = "Phormer is just uninstalled, successfully<br />\n"485 ."This is the very last page of Phormer and it has removed all its files!<br />\n"486 ."<br />\n"487 ."Now, just <tt>rm -rf *</tt> the installation directory.<br />\n"488 ."<br />\n"489 ."Have fun!<br />\n"490 ."<br />\n";491 }492493?>494 <div class="back2mainR"><a target="_blank" href=".">&nbsp;View Gallery &gt;&gt; </a></div>495 <div class="back2main"><a href="?">&lt;&lt; Admin Page</a></div>496 <div class="clearer" style="margin-top: 27px;"></div>497 <?php498 if (strlen($ok_msg))499 echo "<div class=\"method\" style=\"text-align: left;\"><span class=\"name\">Phormer Uninstalled!</span>"500 ."<div style=\"padding: 10px 40px 20px;\">$log_msg</div>"501 ."<div class=\"note_valid\">$ok_msg</div></div><br /><br />";502 else {503 ?>504 <div class="method" style="text-align: left">505 <span class="name">Uninstall Phormer</span>506 <div class="inside">507 <center>508 Are you509 <?php510 for ($i=0; $i<$_GET['sure']; $i++)511 echo "<span style=\"color: #900; font-weight: bold;\">REALLY</span> ";512 ?>513 sure you want to uninstall phormer?!<br />514 <br />515 <span style="color: #C00; font-weight: bold; font-size: 12px;">Note: This command is not reversible! You'll Lose everything!</span>516 <br /><br />517 <form method="post" action="admin.php?page=uninstall&sure=<?php echo ($_GET['sure']+1); ?>">518 <input class="submit" style="background: #FCB;" type="submit" value="&nbsp;&nbsp;&nbsp;Yes, Dump Phormer!&nbsp;&nbsp;&nbsp;"></input>519 </form>520 &nbsp; &nbsp;521 <form method="post" action="admin.php?">522 <input class="submit" type="submit" value="&nbsp;&nbsp;&nbsp;No! Just Back to Main&nbsp;&nbsp;&nbsp;"></input>523 </form>524 <br />525 <br />526 </center>527 </div>528 </div>529<?php530 }531 }532533if (page_is('install')) {534?>535 <div class="clearer" style="margin-top: 57px;"></div>536 <div class="method" style="text-align: left">537 <span class="name">First Time Installation</span>538 <div class="inside">539 <form method="post" action="?page=doinstall" onsubmit="javascript:return checkInstallPass();">540 <center>541 <div class="note_valid">542 Welcome to Phormer for the first time! <br />543 Question marks, like <?php writeHelp("help"); ?> helps you. <br />544 </div>545 <br />546 <div style="margin : 10px 160px; text-align: left; padding: 10px 20px; border: 3px double #FFF; background: #E8F0F8; ">547 <?php548 $exts = array("GD" => $hasgd, "ZIP" => $haszip, "EXIF" => $hasexif);549 reset($exts);550 foreach ($exts as $name => $has) {551 $color = ($has)?"#567":"#A43";552 $msg = ($has)?"Fortunately, this server has $name extension of PHP."553 :"Unfortunately, this server does not have $name extension of PHP!";554 echo "\t\t\t\t\t\t<span class=\"dot\">&#149;</span>"555 ."<span style=\"color:$color;\">$msg</span>".getHelp($name." Extension")."<br />\n";556 }557 ?>558 </div>559 <br />560561 <table width="50%" cellpadding="3">562<?php563 if (!is_writable('.')) {564 clearstatcache();565 echo "<div class=\"note_error\">"566 ."<b>ERROR: "567 ."<a href=\".\">Base directory</a> is not writable by PHP server.<br />\n"568 ."</b>Just give it the a+w (write premission to all) access for installation and remove "569 ."it when installation completed."570 ."</div>";571 }572?>573 <?php if (strlen($alert_msg)) echo "<tr><td colspan=\"2\" class=\"note_invalid\">$alert_msg</td></tr>"; ?>574 <tr><td>Enter your desired Admin password:</td><td><input name="newpasswd" id="newpasswd" type="password" class="text" size="20"></input></td></tr>575 <tr><td>The desired Admin password, again:</td><td><input name="newpasswd2" id="newpasswd2" type="password" class="text" size="20"></input></td></tr>576 <tr><td colspan="2" style="text-align: center"><input class="submit" type="submit" value="&nbsp;&nbsp;&nbsp;Install Phormer&nbsp;&nbsp;&nbsp;"></input></td></tr>577 </table>578 </center>579 </form>580 </div>581 </div>582<?php583 }584585if (page_is('doneinside')) {586?>587 <div class="clearer" style="margin-top: 57px;"></div>588 <div class="method" style="text-align: left">589 <span class="name">Action Performed</span>590 <div class="inside" style="padding: 0px 100px">591 <?php if (strlen($alert_msg)) echo "<div class=\"note_valid\">$alert_msg</div><br />"; ?>592 <span class="dot">&#149;</span><a href=".">Main Page</a><br />593 <span class="dot">&#149;</span><a href="?page=logout">Logout</a><br />594 <br />595 </div>596 </div>597<?php598 }599600if (page_is('doneoutside')) {601?>602 <div class="clearer" style="margin-top: 57px;"></div>603 <div class="method" style="text-align: left">604 <span class="name">Action Performed</span>605 <div class="inside" style="padding: 0px 100px">606 <?php if (strlen($alert_msg)) echo "<div class=\"note_valid\">$alert_msg</div><br />"; ?>607 <span class="dot">&#149;</span><a href="?">Login</a><br />608 <span class="dot">&#149;</span><a href=".">View PhotoGallery</a><br />609 <br />610 </div>611 </div>612<?php613 }614615 if (page_is('editxml')) {616 $theSrc = isset($_GET['src'])?$_GET['src']:(isset($_POST['src'])?$_POST['src']:'');617 $cmd = isset($_GET['cmd'])?$_GET['cmd']:'';618 $open = false;619 $f = '';620 $isOpen = (strcmp($cmd, 'open') == 0);621 $isRestore = (strcmp($cmd, 'restore') == 0);622 $isSave = (strcmp($cmd, 'save') == 0);623 if ((strlen($theSrc) > 0) && ($isOpen || $isRestore || $isSave)) {624 if ($isRestore) {625 if (!file_exists($theSrc.".bku"))626 $alert_msg = "No Backup of the file \"$theSrc\" is available :(!";627 else {628 copy($theSrc.".bku", $theSrc);629 $ok_msg = "Backup successfully restored!";630 }631 }632 else if ($isOpen) {633 if (!file_exists($theSrc))634 $alert_msg = "File not exists!";635 else {636 $f = file_get_contents($theSrc);637 $open = true;638 //$f = strtr($f, $transtable);639 $f = htmlspecialchars($f, ENT_COMPAT, 'UTF-8');640 }641 }642 else if ($isSave) {643 copy($theSrc, $theSrc.".bku");644 $f = fopen($theSrc, "w");645 //echo $_POST['txt']."\n";646 //$_POST['txt'] = strtr($_POST['txt'], $transtable);647 fputs($f, $_POST['txt']);648 fclose($f);649 $ok_msg = "Changes Saved successfully!";650 }651 }652 $defAdd = ((strlen($theSrc)>0) && (strlen($alert_msg) == 0))?$theSrc:"data/categories.xml";653?>654 <div class="back2mainR"><a target="_blank" href=".">&nbsp;View Gallery &gt;&gt; </a></div>655 <div class="back2main"><a href="?">&lt;&lt; Admin Page</a></div>656 <div class="part">657 <div class="title"><a style="color: white" href="?page=editxml">XML Editor:</a></div>658 <div class="inside">659 <?php if (strlen($alert_msg)) echo "<div class=\"method\"><div class=\"note_invalid\">$alert_msg</div></div><br />"; ?>660 <?php if (strlen($ok_msg)) echo "<div class=\"method\"><div class=\"note_valid\">$ok_msg</div></div><br />"; ?>661 <table cellspacing="0" cellpadding="0" width="100%" style="position:relative"><tr><td width="50%">662 <div class="method">663 <span class="name">Edit Content:</span><br />664 <table width="100%" cellspacing="0" cellpadding="0">665 <tr><td>666 <span class="dot">&#149;</span><a href="?page=editxml&cmd=open&src=data%2Fcategories.xml">Categories</a>667 </td><td>668 <span class="dot">&#149;</span><a href="?page=editxml&cmd=open&src=data%2Fstories.xml">Stories</a>669 </td><td>670 <span class="dot">&#149;</span><a href="?page=editxml&cmd=open&src=data%2Fphotos.xml">Photos</a>671 </td>672 </tr><tr>673 <td>674 <span class="dot">&#149;</span><a href="?page=editxml&cmd=open&src=data%2Fcomments.xml">Comments</a>675 </td><td>676 <span class="dot">&#149;</span><a href="?page=editxml&cmd=open&src=data%2Fbasis.xml">Basis</a>677 </td><td>678 </td></tr>679 </table>680 <center><hr size="1" color="#BBB" width="60%" style="margin: 15px 0px;" /></center>681 <form method="get" action="?" onsubmit="return true;">682 <input type="hidden" name="page" value="editxml"></input>683 <input type="hidden" name="cmd" value="open"></input>684 <span class="dot">&#149;</span>XML Source:685 <input name="src" class="text" size="35" type="text" value="<?php echo $defAdd; ?>"></input>686 <br />687 <center><input style="margin-top: 15px;" class="submit" type="submit" value="Open the File"></input></center>688 </form>689 </div>690 </td><td width="50%">691 <div class="method">692 <span class="name">Restore Backup:</span><br />693 <table width="100%" cellspacing="0" cellpadding="0">694 <tr><td>695 <span class="dot">&#149;</span><a onclick="return ConfirmRestore();" href="?page=editxml&cmd=restore&src=data%2Fcategories.xml">Categories</a>696 </td><td>697 <span class="dot">&#149;</span><a onclick="return ConfirmRestore();" href="?page=editxml&cmd=restore&src=data%2Fstories.xml">Stories</a>698 </td><td>699 <span class="dot">&#149;</span><a onclick="return ConfirmRestore();" href="?page=editxml&cmd=restore&src=data%2Fphotos.xml">Photos</a>700 </td>701 </tr><tr>702 <td>703 <span class="dot">&#149;</span><a onclick="return ConfirmRestore();" href="?page=editxml&cmd=restore&src=data%2Fcomments.xml">Comments</a>704 </td><td>705 <span class="dot">&#149;</span><a onclick="return ConfirmRestore();" href="?page=editxml&cmd=restore&src=data%2Fbasis.xml">Basis</a>706 </td><td>707 </td></tr>708 </table>709 <center><hr size="1" color="#BBB" width="60%" style="margin: 15px 0px;" /></center>710 <form method="get" action="?" onsubmit="return ConfirmRestore();">711 <span class="dot">&#149;</span>XML Source:712 <input type="hidden" name="page" value="editxml"></input>713 <input type="hidden" name="cmd" value="restore"></input>714 <input name="src" class="text" size="35" type="text" value="<?php echo $defAdd; ?>"></input>715 <br />716 <center><input style="margin-top: 15px;" class="submit" type="submit" value="Restore Backup"></input></center>717 </form>718 </div>719 </td></tr></table>720 <?php if ($open) { ?>721 <div class="method" style="margin-top: 25px;">722 <span class="name">XML Content of "<tt><?php echo $theSrc; ?></tt>":</span><br />723 <center>724 <form enctype="multipart/form-data" method="post" action="?page=editxml&cmd=save" onsubmit="return ConfirmSave();">725 <textarea class="textarea" rows="10" cols="70" name="txt"><?php echo $f; ?></textarea><br /><br />726 <input class="text" type="hidden" name="src" value="<?php echo $theSrc; ?>"></input>727 <input class="submit" type="submit" value="&nbsp;Save Changes&nbsp;"></input>728 <span style="padding-left: 20px;"></span>729 <input class="reset" type="reset" value="&nbsp;Reset Changes &nbsp;"></input>730 </form>731 </center>732 </div>733 <?php } ?>734 </div>735 </div>736<?php737 }738739if (page_is('categories')) {740 $categs = array();741 $edit = false;742 $doDel = false;743 $ok_msg = '';744 $alert_msg = '';745 $cmd = '';746 $cid = '';747 parse_container('categs', 'Category', 'data/categories.xml');748 handle_container('categs', 'Category', 'c');749 if (!strlen($alert_msg) && strlen($cmd))750 save_container('categs', 'Category', 'data/categories.xml');751 print_container('categs', 'Category', 'Categories', 'c');752?>753<?php754 }755756if (page_is('stories')) {757 $stories = array();758 $edit = false;759 $doDel = false;760 $ok_msg = '';761 $alert_msg = '';762 $cmd = '';763 $sid = '';764 parse_container('stories', 'Story', 'data/stories.xml');765 handle_container('stories', 'Story', 's');766 if (!strlen($alert_msg) && strlen($cmd))767 save_container('stories', 'Story', 'data/stories.xml');768 print_container('stories', 'Story', 'Stories', 's');769?>770771<?php772 }773774if (page_is('basis') || page_is('configs')) {775 if (isset($_GET['cmd'])) {776 $cmd = $_GET['cmd'];777 if (strcmp($cmd, 'save') == 0) {778 if (!isset($_POST['lastInput']))779 $alert_msg = "The page is corrupted, come again!";780 else {781 $criminals = array('extra', 'pgname', 'pgdesc', 'auname', 'auemail', 'icon', 'bannedip');782 foreach ($criminals as $key)783 if (isset($_POST[$key]))784 $_POST[$key] = htmlspecialchars($_POST[$key], ENT_QUOTES, "UTF-8");785786 $checkboxes = array("checkcateg", "checkstory", "checklink", "checkstat", "checkextra",787 "checkemail", "checkrss", "checkadmin");788 if (page_is('basis'))789 foreach ($checkboxes as $item)790 if (!isset($_POST[$item]))791 $_POST[$item] = "off";792793 foreach ($_POST as $key => $value)794 if (strcmp(substr($key, 0, 5), "dummy") != 0)795 $basis[$key] = $value;796 if (page_is('basis')) {797 $basis['links'] = array();798 while (NULL !== array_pop($basis['links']));799 for ($i=0; $i<$_POST['nLink']; $i++)800 array_push($basis['links'],801 array('name' => $_POST["l${i}n"],802 'href' => $_POST["l${i}h"],803 'title' => $_POST["l${i}t"]));804 }805806 save_container('basis', 'Basis', 'data/basis.xml');807 foreach ($criminals as $key)808 if (isset($_POST[$key]))809 $_POST[$key] = strtr($_POST[$key], $transtable);810 $smoothcriminals = array('pgname', 'auname', 'auemail', 'icon');811 foreach ($smoothcriminals as $key)812 if (isset($basis[$key]))813 $basis[$key] = strtr($basis[$key], $transmanual);814815816 $ok_msg = "Changes to ".(page_is('basis')?"basis":"configurations").", saved successfully!";817 # echo "<pre>".print_r($basis, true)."</pre>";818 if (isset($_GET['firsttime']))819 header('Location:?page=welcome');820 }821 }822 else823 $alert_msg = $cmd.' is not a valid command!';824 }825}826827$field_sep = "\t\t\t\t\t\t<tr><td colspan=\"2\"><div class=\"basisTitleHR\">&nbsp;</div></td></tr>\n";828829if (page_is('basis')) {830 $disp = "style=\"display:".($afterInstall?"none":"table-row")."\" ";;831?>832 <div class="back2mainR"><a target="_blank" href=".">&nbsp;View Gallery &gt;&gt; </a></div>833 <div class="back2main"><a href="?">&lt;&lt; Admin Page</a></div>834 <div class="part">835 <div class="title"><a style="color: white" href="?page=basis">Preferences:</a></div>836 <div class="inside">837 <?php if (strlen($alert_msg)) echo "<div class=\"method\"><div class=\"note_invalid\">$alert_msg</div></div><br />"; ?>838 <?php if (strlen($ok_msg)) echo "<div class=\"method\"><div class=\"note_valid\">$ok_msg</div></div><br />"; ?>839 <div class="method">840 <span class="name">Basic Preferences:</span><br />841 <form enctype="multipart/form-data" method="post" action="?page=basis&cmd=save<?php if (isset($firsttime) && ($firsttime)) echo "&firsttime=true"; ?>">842 <center><input style="margin-top: 15px;" class="submit" type="submit" value="Save Changes"></input></center>843 <br />844845 <center>846 <table width="80%" cellspacing="0" cellpadding="2" style="text-align: left; position: relative; top: -10px;">847848 <?php echo $field_sep; ?>849850851 <tr><td valign="top">852 <span class="dot">&#149;</span><b>PhotoGallery's Name</b>853 <?php writeHelp("PhotoGallery Name"); ?>:854 </td><td>855 <input name="pgname" class="text" size="30" type="text" value="<?php echo (isset($basis['pgname']))?$basis['pgname']:"My PhotoGallery"; ?>"></input>856 </td></tr>857858 <?php # echo $field_sep; ?>859860861 <tr><td valign="top">862 <span class="dot">&#149;</span><b>PhotoGallery's Description</b>863 <?php writeHelp("PhotoGallery Desc"); ?>:864 </td><td>865 <textarea name="pgdesc" class="textarea" cols="30" type="text" rows="3"><?php echo $basis['pgdesc']; ?></textarea>866 </td></tr>867868 <?php echo $field_sep; ?>869870 <tr><td valign="top">871 <span class="dot">&#149;</span><b>Author's Name</b>872 <?php writeHelp("Author Name"); ?>:873 </td><td>874 <input name="auname" class="text" size="30" type="text" value="<?php echo $basis['auname']; ?>"></input>875 </td></tr>876877 <?php # echo $field_sep; ?>878879 <tr><td valign="top">880 <span class="dot">&#149;</span><b>Author's Email Address</b>881 <?php writeHelp("Author Email"); ?>:882 </td><td>883 <input name="auemail" class="text" size="30" type="text" value="<?php echo $basis['auemail']; ?>"></input>884 </td></tr>885886 <?php echo $field_sep; ?>887888 <tr><td valign="top">889 <span class="dot">&#149;</span><b>Theme</b>890 <?php writeHelp("Theme"); ?>:891 </td><td>892 <span style="padding-left: 7px;"></span>893 <select id="theme" name="theme" class="select" size="1" onchange="javascript:changePrev(this.value, '');">894 <?php895 $defstyles = array( 'white', 'wheat', 'silver', 'dusty', 'sky',896 'bog', 'purple', 'slate', 'timber', 'blacky');897 $styles = $defstyles;898 /* External CSSes */899 if ($handle = opendir('files/externalcss')) {900 while (false !== ($file = readdir($handle))) {901 if ($file != "." && $file != ".." && !is_dir($file) &&902 (strcmp(substr($file, -4), '.css') == 0))903 array_push($styles, $file);904 }905 closedir($handle);906 }907908 foreach ($styles as $theme) {909 $sel = (strcmp($theme, $basis['theme']) == 0);910 $ext = in_array($theme, $defstyles)?"":"+ External: ";911 echo "\t\t\t\t\t\t<option ".($sel?"selected=\"selected\"":"")."value=\"$theme\">".$ext.ucfirst($theme)."</option>\n";912 }913 ?>914 </select>915 <span style="padding-left: 10px;"></span>916 [<a target="_blank" style="" id="prevmode2" href=".?theme=<?php echo $basis['theme']; ?>">Preview</a>]917 </td></tr>918919 <?php if (!$afterInstall) echo $field_sep; ?>920921 <tr <?php echo $disp; ?>><td valign="top">922 <span class="dot">&#149;</span><b>Index Page Layout</b>923 <?php writeHelp("Index Mode"); ?>:924 </td><td>925 [<a target="_blank" id="prevmode1" href=".?mode=<?php echo $basis['mode']; ?>">Preview</a>]926 </td></tr>927 <tr <?php echo $disp; ?>><td colspan="2">928 <table style="margin: 20px 0px; background: #9AB; border: 1px solid #678;" width="100%">929 <tr style="background: #BCD">930 <td style="text-align:center" width="180px"><b>SideBar</b></td>931 <td style="text-align:center"><b>Main Column</b></td>932 </tr>933 <tr style="background: #F8FCFF;">934 <td valign="top" style="padding: 15px 0px 20px 30px;" width="180px">935 <?php936 $hr = "\t\t\t\t\t<hr width=\"70%\" size=\"1\" style=\"margin: 10px 0px 10px 10px;\" color=\"#999\" />\n";937938 writeSideCheckBox("checkcateg", "Categories List");939 echo $hr;940 writeSideCheckBox("checkstory", "Stories List");941 echo $hr;942 writeSideCheckBox("checklink", "Links list");943 echo $hr;944 writeSideCheckBox("checkstat", "Statistics");945 echo $hr;946 writeSideCheckBox("checkextra", "Extra HTML");947 echo $hr;948 writeSideCheckBox("checkemail", "Email");949 writeSideCheckBox("checkrss", "RSS");950 writeSideCheckBox("checkadmin", "Admin Page");951 ?>952 </td>953 <td id="allModes" valign="top" style="text-align:center; padding: 20px 0px 10px;">954 <?php955 $mode = $basis['mode'];956 $tok = explode("-", $mode);957 $n = 0;958 foreach ($tok as $t)959 writeMainColDropDown($t, $n++);960 ?>961 <a style="cursor: pointer" onclick="javascript:addMainColDiv();">More Item &#133;</a><br /><br />962 </td>963 </tr>964 </table>965 <input type="hidden" id="mode" name="mode" class="text" value="<?php echo $basis['mode']; ?>"></input>966 </td></tr>967968 <?php if (!$afterInstall) echo $field_sep; ?>969970 <tr <?php echo $disp; ?>><td colspan="2">971 <span class="dot">&#149;</span><b>External Links &#133; </b>972 <?php writeHelp("External Links"); ?>:973 </td></tr>974975 <tr <?php echo $disp; ?>><td colspan="2">976 <table width="100%" cellspacing="0" cellpadding="2" id="allLinkLines">977 <tr style="text-align: center; font-weight: bold;">978 <td> No </td>979 <td> Link Name <?php writeHelp("Link Name"); ?></td>980 <td> Link URL <?php writeHelp("Link URL"); ?></td>981 <td> Link Title <?php writeHelp("Link Title"); ?></td>982 <td> Add/Del <?php writeHelp("Add/Del Link"); ?></td>983 </tr>984<?php985 $n = 0;986 reset($basis['links']);987 while (list($key, $val) = each($basis['links']))988 writeLinkLine($n++, $val);989 reset($basis['links']);990?>991 </tr>992 </table>993 <input type="hidden" name="nLink" id="nLink" value="<?php echo $n; ?>"></input>994 <input type="hidden" name="lastInput" value="lastInput"></input>995 </td></tr>996 </table>997 <center><input style="margin-top: 15px;" class="submit" type="submit" value="Save Changes"></input></center>998 <div class="basisTitle" style="border-top-width: 0px;"></div>999 </center>1000 </form>1001 </div>1002 </div>1003 </div>1004<?php1005}10061007if (page_is('configs')) {1008 global $basis;1009 if (!isset($basis['copyright']))1010 $basis['copyright'] = DEFAULT_COPYRIGHT;1011?>1012 <div class="back2mainR"><a target="_blank" href=".">&nbsp;View Gallery &gt;&gt; </a></div>1013 <div class="back2main"><a href="?">&lt;&lt; Admin Page</a></div>1014 <div class="part">1015 <div class="title"><a style="color: white" href="?page=configs">Configurations:</a></div>1016 <div class="inside">1017 <div class="method">1018 <span class="name">External Modular Actions1019 <?php writeHelp("Modular Actions"); ?>:</span><br />1020 <div style="padding: 5px 50px; color: #666; line-height: 200%;">1021 <span class="dot">&#149;</span><img width="20px" height="20px" class="logo" src="files/adminfiles/logo_lock.gif" /><a href="?page=changepass">Change Password</a>1022 <?php writeHelp("Change Password"); ?><br />1023 <span class="dot">&#149;</span><img width="20px" height="20px" class="logo" src="files/adminfiles/logo_death.gif" /><a href="?page=uninstall">Uninstall Phormer</a>1024 <?php writeHelp("Uninstall Phormer"); ?><br />1025 <!--1026 <br />1027 <span class="dot">&#149;</span><img width="20px" height="20px" class="logo" src="files/adminfiles/logo_configs.gif" /><a href="#AdvancedConfigurations">Advanced Options</a>1028 <?php writeHelp("Advanced Options Link"); ?><br />1029 -->1030 </div>1031 </div>10321033 <br />1034 <?php if (strlen($alert_msg)) echo "<div class=\"method\"><div class=\"note_invalid\">$alert_msg</div></div>"; ?>1035 <?php if (strlen($ok_msg)) echo "<div class=\"method\"><div class=\"note_valid\">$ok_msg</div></div>"; ?>10361037 <a name="AdvancedConfigurations"></a>1038 <br style="margin-top: 5px;" />10391040 <div class="method">1041 <span class="name">Advanced Options:</span><br />1042 <form enctype="multipart/form-data" method="post" action="?page=configs&cmd=save<?php if (isset($firsttime) && ($firsttime)) echo "&firsttime=true"; ?>">1043 <center>1044 <br />10451046 <center><input class="submit" type="submit" value="Save Changes"></input></center>1047 <br />10481049 <table width="80%" cellspacing="0" cellpadding="2" style="text-align: left; position: relative; top: -10px;">10501051 <?php echo $field_sep; ?>10521053 <tr><td valign="top">1054 <span class="dot">&#149;</span><b>Default Num of Photos in Box Mode</b>1055 <?php writeHelp("Default Photo Num in Box"); ?>:1056 </td><td>1057 &nbsp;&nbsp;1058 <select name="defjbn" class="select" size="1">1059 <?php1060 if (!isset($basis['defjbn']))1061 $basis['defjbn'] = 50;1062 $values = array(5, 10, 20, 50, 75, 100, 200, 1000);1063 foreach ($values as $v) {1064 $sel = ($basis['defjbn'] == $v)?" selected=\"selected\"":"";1065 echo "\t\t\t\t\t<option value=\"$v\"$sel>$v</option>\n";1066 }1067 ?>1068 </select>1069 </td></tr>1070 <tr><td valign="top">1071 <span style="padding-left: 93px;"></span> <b>Photos in Recent Photos</b>1072 <?php writeHelp("Default Photo Num in Recents"); ?>:1073 </td><td>1074 &nbsp;&nbsp;1075 <select name="defrpc" class="select" size="1">1076 <?php1077 if (!isset($basis['defrpc']))1078 $basis['defrpc'] = 20;1079 $values = array(5, 10, 15, 20, 25, 30, 40, 50, 75, 100, 200, 1000);1080 foreach ($values as $v) {1081 $sel = ($basis['defrpc'] == $v)?" selected=\"selected\"":"";1082 echo "\t\t\t\t\t<option value=\"$v\"$sel>$v</option>\n";1083 }1084 ?>1085 </select>1086 </td></tr>1087 <tr><td valign="top">1088 <span style="padding-left: 93px;"></span> <b>Photos in Top Rated/Visited</b>1089 <?php writeHelp("Default Photo Num in Tops"); ?>:1090 </td><td>1091 &nbsp;&nbsp;1092 <select name="deftrc" class="select" size="1">1093 <?php1094 if (!isset($basis['deftrc']))1095 $basis['deftrc'] = 10;1096 $values = array(5, 10, 15, 20, 25, 30, 40, 50, 75, 100, 200, 1000);1097 foreach ($values as $v) {1098 $sel = ($basis['deftrc'] == $v)?" selected=\"selected\"":"";1099 echo "\t\t\t\t\t<option value=\"$v\"$sel>$v</option>\n";1100 }1101 ?>1102 </select>1103 </td></tr>1104 <tr><td valign="top">1105 <span style="padding-left: 93px;"></span> <b>Stories in Story mode</b>1106 <?php writeHelp("Default Story Num in mode"); ?>:1107 </td><td>1108 &nbsp;&nbsp;1109 <select name="defrsc" class="select" size="1">1110 <?php1111 if (!isset($basis['defrsc']))1112 $basis['defrsc'] = 5;1113 $values = array(1, 3, 5, 10, 20, 50, 1000);1114 foreach ($values as $v) {1115 $sel = ($basis['defrsc'] == $v)?" selected=\"selected\"":"";1116 echo "\t\t\t\t\t<option value=\"$v\"$sel>$v</option>\n";1117 }1118 ?>1119 </select>1120 </td></tr>1121 <tr><td valign="top">1122 <span style="padding-left: 93px;"></span> <b>Stories in Sidebar</b>1123 <?php writeHelp("Default Story Num in Sidebar"); ?>:1124 </td><td>1125 &nbsp;&nbsp;1126 <select name="defrss" class="select" size="1">1127 <?php1128 if (!isset($basis['defrss']))1129 $basis['defrss'] = 100;1130 $values = array(1, 3, 5, 10, 20, 30, 50, 75, 100, 1000);1131 foreach ($values as $v) {1132 $sel = ($basis['defrss'] == $v)?" selected=\"selected\"":"";1133 echo "\t\t\t\t\t<option value=\"$v\"$sel>$v</option>\n";1134 }1135 ?>1136 </select>1137 </td></tr>11381139 <?php echo $field_sep; ?>11401141 <tr><td valign="top">1142 <span class="dot">&#149;</span><b>Transparency Percentage</b>1143 <?php writeHelp("Transparency Percentage"); ?>:1144 </td><td>1145 &nbsp;&nbsp;1146 <select name="opac" class="select" size="1">1147 <?php1148 global $basis;1149 if (!isset($basis['opac']))1150 $basis['opac'] = DEFAULT_OPAC_RATE;1151 for ($i=0; $i<=100; $i += 10) {1152 $sel = ($i == $basis['opac'])?" selected=\"selected\"":"";1153 echo "\t\t\t\t<option$sel value=\"$i\">$i %</option>\n";1154 }1155 ?>1156 </select>1157 </td></tr>11581159 <?php echo $field_sep; ?>11601161 <tr><td valign="top">1162 <span class="dot">&#149;</span><b>Jpeg Compression Percentage</b>1163 <?php writeHelp("Jpeg Compression Percentage"); ?>:1164 </td><td>1165 &nbsp;&nbsp;1166 <select name="jpegq" class="select" size="1">1167 <?php1168 global $basis;1169 if (!isset($basis['jpegq']))1170 $basis['jpegq'] = DEFAULT_JPEG_QUAL;1171 for ($i=0; $i<=100; $i += 10) {1172 $sel = ($i == $basis['jpegq'])?" selected=\"selected\"":"";1173 echo "\t\t\t\t<option$sel value=\"$i\">$i %</option>\n";1174 }1175 ?>1176 </select>1177 </td></tr>11781179 <?php11801181 echo $field_sep;11821183 write_radio_list("Help System Display", 'Help System',1184 'helplang', array('en', 'it', 'off'),1185 array('English', 'Italian', "Don't Show"));11861187 echo $field_sep;11881189 write_radio_list("Display Author's Email Style", 'Display Email',1190 'showemail', array('link', 'asis', 'text', 'hide'),1191 array('Modified', 'As Is', 'Text', 'Hidden'));11921193 echo $field_sep;11941195 write_radio_list("Thumbnails' Links Target Window", 'Thumb Links Target',1196 'linktarget', array('_self', 'default', '_blank'),1197 array('Same', 'Common', 'New'));11981199 echo $field_sep;12001201 write_radio_list('Pick Neighbours from ...', 'Pick Neighbours',1202 'pickneigh', array('all', 'categs', 'stories'),1203 array('Both', 'Category', 'Story'));12041205 echo $field_sep;12061207 write_radio_list('Word verification ', 'Word Verification',1208 'haswvw', array('yes', 'no'),1209 array('Enable', 'Disable'));12101211 echo $field_sep;12121213 write_radio_list('Check for Updates ', 'Check Updates',1214 'updatecheck', array('enable', 'disable'),1215 array('Enable', 'Disable'));12161217 echo $field_sep;1218 ?>12191220 <tr><td valign="top">1221 <span class="dot">&#149;</span><b>Time Differ with Server</b>1222 <?php writeHelp("Time Differ"); ?>:1223 <script language="javascript" type="text/javascript">1224 nowTime = new Date;1225 nowTime.setHours(<?php echo date("G"); ?>);1226 nowTime.setMinutes(<?php echo date("i"); ?>);1227 </script>1228 </td><td>1229 <input name="timediffer" id="timediffer" class="text" size="10" type="text"1230 onchange="javascript:updateTimeDiffer(this.value)"1231 onkeyup="javascript:updateTimeDiffer(this.value)"1232 value="<?php echo (isset($basis['timediffer']))?$basis['timediffer']:"0*60+0"; ?>"></input>1233 <b style="font-size: 1.5em;">&rarr;</b> &nbsp; Time'll be (<span id="timeDiffShow"><?php echo date("H:i", GetTimeWithDiffer()); ?></span>)1234 <script language="javascript" type="text/javascript">1235 updateTimeDiffer(dg('timediffer').value);1236 </script>1237 </td></tr>12381239 <?php echo $field_sep; ?>12401241 </table>1242 <table width="80%" cellspacing="0" cellpadding="2" style="text-align: left; position: relative; top: -10px;">12431244 <tr><td valign="top">1245 <span class="dot">&#149;</span><b>HTML icon URL</b>1246 <?php writeHelp("HTML icon URL"); ?>:1247 </td><td>1248 <input name="icon" class="text" size="64" type="text" value="<?php echo (isset($basis['icon']))?$basis['icon']:""; ?>"></input>1249 </td></tr>12501251 <?php echo $field_sep; ?>12521253 <tr><td valign="top">1254 <span class="dot">&#149;</span><b>Copyright Note</b>1255 <?php writeHelp("Copyright Note"); ?>:1256 </td><td>1257 <textarea name="copyright" class="textarea" cols="40" type="text" rows="4"><?php echo $basis['copyright']; ?></textarea>1258 </td></tr>12591260 <?php echo $field_sep; ?>12611262 <tr><td valign="top">1263 <span class="dot">&#149;</span><b>Extra HTML Code</b>1264 <?php writeHelp("Extra HTML Code"); ?>:1265 </td><td>1266 <textarea name="extra" class="textarea" cols="40" type="text" rows="4"><?php echo $basis['extra']; ?></textarea>1267 </td></tr>12681269 <?php echo $field_sep; ?>12701271 <tr><td valign="top">1272 <span class="dot">&#149;</span><b>Banned Unwanted IPs</b>1273 <?php writeHelp("Banned IPs"); ?>:1274 </td><td>1275 <textarea name="bannedip" class="textarea" cols="40" type="text" rows="4"><?php echo isset($basis['bannedip'])?$basis['bannedip']:''; ?></textarea>1276 </td></tr>12771278 <?php echo $field_sep; ?>12791280 </table>1281 <input type="hidden" name="lastInput" value="lastInput"></input>1282 <center><input class="submit" type="submit" value="Save Changes"></input></center>1283 <div class="basisTitle" style="border-top-width: 0px;"></div>1284 </center>1285 </form>1286 </div> <!-- method -->1287 </div> <!-- inside -->1288 </div> <!-- part -->1289<?php1290}12911292if (page_is('changepass')) {1293?>1294 <div class="back2mainR"><a target="_blank" href=".">&nbsp;View Gallery &gt;&gt; </a></div>1295 <div class="back2main"><a href="?">&lt;&lt; Admin Page</a></div>1296 <div class="part">1297 <div class="title"><a style="color: white" href="?page=changepass">Change Password:</a></div>1298 <div class="inside">1299 <?php if (strlen($alert_msg)) echo "<div class=\"method\"><div class=\"note_invalid\">$alert_msg</div></div><br />"; ?>1300 <?php if (strlen($ok_msg)) echo "<div class=\"method\"><div class=\"note_valid\">$ok_msg</div></div><br />"; ?>1301 <div class="method" style="text-align: left">1302 <span class="name">Change Administrator's Password</span>1303 <div class="inside">1304 <form method="post" action="?page=dochangepass" onsubmit="javascript:return checkChangePass();">1305 <center>1306 <table width="50%" cellpadding="3" style="text-align: left;">1307 <tr><td>Current password:</td><td><input name="curpasswd" type="password" class="text" size="20"></input></td></tr>1308 <tr><td>New password:</td><td><input name="newpasswd1" id="newpasswd1" type="password" class="text" size="20"></input></td></tr>1309 <tr><td>New password, again:</td><td><input name="newpasswd2" id="newpasswd2" type="password" class="text" size="20"></input></td></tr>1310 <tr><td colspan="2"></td></tr>1311 <tr><td colspan="2" style="text-align: center"><input class="submit" type="submit" value="&nbsp;&nbsp;&nbsp;Change Password&nbsp;&nbsp;&nbsp;"></input></td></tr>1312 </table>1313 </center>1314 </form>1315 </div>1316 </div> <!-- method -->1317 </div> <!-- inside -->1318 </div> <!-- part -->1319<?php1320 }13211322if (page_is('comments')) {1323 $comments = array();1324 $ok_msg = '';1325 $alert_msg = '';1326 $cmd = '';1327 $iid = '';1328 parse_container('comments', 'Comment', 'data/comments.xml');1329 /*1330 ksort($comments);1331 echo "<div style=\"dir: ltr; text-align: left;\"><pre>";1332 print_r($comments);1333 echo "</pre></div>";1334 */1335 save_container('comments', 'Comment', 'data/comments.xml');1336 $stories = array();1337 parse_container('stories', 'Story', 'data/stories.xml');1338 parse_container('photos', 'Photo', 'data/photos.xml');13391340 if (isset($_GET['cmd'])) {1341 $cmd = $_GET['cmd'];1342 if (!isset($_GET['iid']) && !isset($_POST['iid']))1343 $alert_msg = "Please enter CommentID as iid!";1344 else {1345 $iid = ((isset($_GET['iid']))?$_GET['iid']:$_POST['iid'])+0;1346 if (strcmp($cmd, 'del') == 0) {1347 if (!isset($comments[$iid]) || !is_array($comments[$iid]))1348 $alert_msg = "No Comment with this CommentID (cid: $iid) exists!";1349 else {1350 $ok_msg = $comments[$iid]['name']."'s Comment (CommentID: $iid) deleted successfully!";1351 unset($comments[$iid]);1352 save_container('comments', 'Comment', 'data/comments.xml');1353 }1354 }1355 else1356 $alert_msg = $cmd.' is not a valid command!';1357 }1358 }13591360 end($comments);1361 $basis['lastcmntseen'] = $comments['lastiid'];1362 save_container('basis', 'Basis', 'data/basis.xml');1363 reset($comments);13641365 $n = isset($_GET['n'])?$_GET['n']:10;1366 if ($n < 0)1367 $n = count($comments);13681369 $st = isset($_GET['st'])?$_GET['st']:0;1370 $st = max($st, 0);1371 $st = min($st, count($comments)-1);1372?>1373 <div class="back2mainR"><a target="_blank" href=".">&nbsp;View Gallery &gt;&gt; </a></div>1374 <div class="back2main"><a href="?">&lt;&lt; Admin Page</a></div>1375 <div class="part">1376 <div class="title"><a style="color: white" href="?page=comments">Manage Comments:</a></div>1377 <div class="inside">1378<?php if (strlen($alert_msg)) echo "\t\t\t\t<div class=\"method\"><div class=\"note_invalid\">$alert_msg</div></div><br />"; ?>1379<?php if (strlen($ok_msg)) echo "\t\t\t\t<div class=\"method\"><div class=\"note_valid\">$ok_msg</div></div><br />"; ?>1380 <div class="method">1381 <span class="name">Recent <?php echo $n; ?> Comments &nbsp;: :&nbsp; Per Page1382 [ <a href="?page=comments&n=5">5</a> |1383 <a href="?page=comments&n=10">10</a> |1384 <a href="?page=comments&n=20">20</a> |1385 <a href="?page=comments&n=50">50</a> |1386 <a href="?page=comments&n=100">100</a> |1387 <a href="?page=comments&n=-1">All</a> ]1388 &nbsp;: :&nbsp; [1389 <a href="?page=comments&n=<?php echo "$n&st=".($st-$n); ?>">Prev Page</a> |1390 <a href="?page=comments&n=<?php echo "$n&st=".($st+$n); ?>">Next Page</a> ]1391 </span><br />1392 <div style="padding-left: 30px">1393 <table width="100%">1394<?php1395 $c = 0;1396 for (end($comments); $c < $st; prev($comments))1397 $c++;13981399 $utoday = GetTimeWithDiffer();14001401 for ($c = 0; $aival = current($comments); prev($comments)){// a idea value!1402 if (is_array($aival)) { // might be info!1403 $aiid = key($comments);1404 if ($c++ >= $n)1405 break;1406 sscanf($aival['owner'], "%c%d", $tl, $tv);1407 $date = $aival['date'];1408 if (strcmp($date, "00-01-01 00:00") == 0)1409 $date = "";1410 else {14111412 $dates = sscanf($date, "%d-%d-%d %d:%d");1413 $udate = mktime($dates[3], $dates[4], 0, $dates[1], $dates[2], $dates[0]);14141415 $diff = SecsToText($utoday-$udate);1416 $date .= " (".$diff.") :: ";1417 }14181419 echo "\t\t\t\t\t\t\t<tr><td class=\"c\" width=\"20%\">";1420 if ($tl == 'p')1421 thumbBox($tv, '', true, true);1422 else1423 echo "Story <br /><a href=\".?s=$tv\">\"".$stories[$tv]['name']."\"</a>";1424 echo "</td>\n";1425 $infoatw = "";1426 if (strlen($aival['email']) > 0)1427 $infoatw .= "<a href=\"mailto:".$aival['email']."\">@</a>";1428 if (strlen($aival['url']) > 0) {1429 if (strlen($infoatw) > 0)1430 $infoatw .= " | ";1431 $infoatw .= "<a href=\"http://".$aival['url']."\">w</a>";1432 }1433 if (strlen($infoatw) > 0)1434 $infoatw = " [ ".$infoatw." ] ";1435 $en = textDirectionEn($aival['txt']);1436 $dir = $en?"":"r";1437 echo "\t\t\t\t\t\t\t<td><span style=\"padding-left: 20px;\" class=\"dot\">&#149;</span>"1438 ."<span class=\"categinfo\">"1439 ."$date</span> "1440 .$aival['name']."&lrm; {".$aival['ip']."}".$infoatw1441 ." said: "1442 ."<span style=\"color: #333; \">"1443 ." [<a href=\"?page=$page&cmd=del&iid=$aiid\" onclick=\"javascript:return confirmDelete('".$comments[$aiid]['name']."'+'\'s comment');\">Delete</a>]"1444 ."</span><br />\n"1445 ."\t\t\t\t\t\t\t<div class=\"categdescnob$dir\">".nl2br($aival['txt'])."</div></td></tr>\n"1446 ."\t\t\t\t\t\t\t<tr><td colspan=\"2\"><hr coor=\"#BCD\" width=\"80%\" size=\"1\" /></td></tr>\n";1447 }1448 }1449 reset($comments);1450?>1451 </table>1452 </div>1453 </div>1454 </div>1455 </div>1456<?php1457 }14581459if (page_is('drafts')) { ?>1460<script type="text/javascript" language="javascript" src="files/adminfiles/addphoto.js"></script>1461<?php1462 $categs = array();1463 $stories = array();1464 $photos = array();1465 $basis = array();1466 parse_container('categs', 'Category', 'data/categories.xml');1467 parse_container('stories', 'Story', 'data/stories.xml');1468 parse_container('photos', 'Photo', 'data/photos.xml');1469 parse_container('basis', 'Basis', 'data/basis.xml');14701471 CleanTemp();14721473 $cmd = '';1474 if (isset($_POST['cmd']))1475 $cmd = $_POST['cmd'];1476 if (isset($_GET['cmd']))1477 $cmd = $_GET['cmd'];14781479 $doUpload = strcmp($cmd, 'doUpload') == 0;1480 $gooddate = date("Y/m/d H:i", GetTimeWithDiffer());1481?>1482 <div class="back2mainR"><a target="_blank" href=".">&nbsp;View Gallery &gt;&gt; </a></div>1483 <div class="back2main"><a href="?">&lt;&lt; Admin Page</a></div>1484<?php if ($doUpload) { ?>1485 <div class="clearer" style="margin-top: 15px;"> </div>1486 <div class="back2main"><span style="padding-left: 13px; "></span><a href="?page=drafts"><< Manage Drafts</a></div>1487<?php } ?>1488 <div class="part">1489 <div class="title"><a style="color: white" href="?page=drafts">Drafts1490 </a><?php writeHelp("Drafts", "#EEE"); ?>:</div>1491<?php if (!$doUpload) { ?>1492 <div class="inside">1493 <div class="method" style="text-align: left; padding-bottom: 15px;">1494 <span class="name">Upload1495 <?php writeHelp("Upload Photos to Draft"); ?>:1496 </span><br />1497 <span style="padding-left: 10px;" class="lightdot">&#149;</span>1498 <a href="?page=drafts&cmd=doUpload">Upload Mass of Items</a>1499 </div> <!-- method -->15001501 <a name="top"></a>1502 <br />1503<?php1504 }15051506 $ok_l = "<div class=\"method\"><div class=\"note_valid\">";1507 $ok_r = "</div></div><br />";15081509 if (strlen($cmd) > 0) {1510 switch($cmd) {1511 case 'doUpload' :1512 break;1513 case 'del' :1514 if (!isset($_GET['draft'])) {1515 $alert_msg = "Draft parameter is needed to be passed through $_GET method!";1516 break;1517 }1518 $draft = $_GET['draft'];1519 $ok_msg = "";//$draft." file(s) deleted successfully: ";1520 $ok_msg .= DeleteFromDrafts("temp/{$draft}_9.jpg");1521 break;1522 case 'groupdel' :1523 reset($_POST);1524 echo $ok_l;1525 $writtenBefore = false;1526 while (list($key, $val) = each($_POST))1527 if ((strcmp($val, "on") == 0) && (strcmp(substr($key, 0, 4), "d_cb") == 0)) {1528 $draft = rawurldecode(substr($key, 4));1529 if ($writtenBefore)1530 echo "<br />\n";1531 echo DeleteFromDrafts("temp/{$draft}_9.jpg");1532 $writtenBefore = true;1533 }1534 echo $ok_r;1535 break;1536 case 'groupadd' :1537 $_POST = array_reverse($_POST, true);1538 reset($_POST);1539 echo $ok_l;1540 # print_r($_POST);1541 while (list($key, $val) = each($_POST))1542 if ((strcmp($val, "on") == 0) && (strcmp(substr($key, 0, 4), "d_cb") == 0)) {1543 $draft = substr($key, 4);1544 $vv = $_POST['d_vv'.$draft];1545 $dpath = "temp/{$vv}_9.jpg";15461547 $seed = random_seed();1548 $pid = ++$photos['lastpid'];1549 $xmlfile = sprintf("data/p_%06d.xml", $pid);15501551 if ($hasexif)1552 $exif = exif_read_data($dpath, 0, true);15531554 $photoInfo = "";1555 $dateTake = substr($_POST['dateadd'], 0, 10);1556 if ($hasexif && ($exif !== FALSE)) {1557 $photoInfo = getEXIFData($exif);1558 $dt = getEXIFDateTime($exif);1559 if (strlen($dt))1560 $dateTake = $dt;1561 }15621563 $photo = array('name' => $_POST["d_tt$draft"],1564 'desc' => $_POST["d_td$draft"],1565 'getcmnts' => $_POST['getcmnts'],1566 'dateadd' => $_POST['dateadd'],1567 'datetake' => $dateTake,1568 'photoinfo' => $photoInfo,1569 'pid' => $pid,1570 'categ' => $_POST['categ'],1571 'story' => $_POST['story'],1572 'postfix' => $seed1573 );15741575 array_push($categs[$photo['categ']]['photo'], $pid);1576 array_push($stories[$photo['story']]['photo'], $pid);15771578 $photos[$pid] = "0 0/0 ".date("Y/m/d-G:i:s", GetTimeWithDiffer());15791580 $postfix = "_".$seed;1581 $pid6let = sprintf("%06d%s_9.jpg", $pid, $postfix);1582 $curppath = PHOTO_PATH.$pid6let;15831584 copy($dpath, $curppath);1585 $ppath = $curppath;1586 GenerateAddPhotoRequired($ppath, true); // $gen3 = true;1587 DeleteFromDrafts($dpath);1588 echo "Photo \"<a href=\".?p=$pid\">".$photo['name']."</a>\" (pid: $pid) added succesfully from file \"{$vv}\"!<br />";1589 save_container('photo', 'Photo', $xmlfile);1590 save_container('categs', 'Category', 'data/categories.xml');1591 save_container('stories', 'Story', 'data/stories.xml');1592 save_container('photos', 'Photo', 'data/photos.xml');1593 }1594 build_rss();1595 echo $ok_r;1596 break;1597 default:1598 $alert_msg = $cmd.' is not a valid command!';1599 }1600 }16011602 if (!$doUpload) {1603?>1604 <?php if (strlen($alert_msg)) echo "<div class=\"method\"><div class=\"note_invalid\">$alert_msg</div></div><br />"; ?>1605 <br />16061607 <div class="method" style="text-align: left; padding-bottom: 15px;">1608 <span class="name">Manage1609 <?php writeHelp("Manage Photos in Draft"); ?>:1610 </span><br />16111612 <form name="TheGlobalForm" enctype="multipart/form-data" method="post" action="?page=drafts" onsubmit="return CheckActionDrafts();">16131614 <table width="98%" cellpadding="3" cellspacing="1" style="border: 1px solid #AAA; position: relative;">1615 <tr style="background-color: #F6F6F6">1616 <td colspan="4" style="padding: 10px 0px 3px;">1617 <center><table width="90%" style="margin-bottom: 8px;"><tr><td>16181619 <span style="padding-left: 10px;" class="lightdot">&#149;</span>1620 <span style="padding-right: 30px;">Actions:</span>16211622 </td><td width="60%" style="text-align: left;">16231624 <label for="groupdel">1625 <input id="groupdel" type="radio" class="radio" name="cmd" value="groupdel" checked="checked"1626 onclick="javascript:hideElem('QuickAddOptionsRow');">1627 Delete Selected <span id="selCount1"></span>&nbsp;Files1628 <?php writeHelp("Drafts :: Delete Selected"); ?>1629 </input>1630 </label>16311632 &nbsp; &nbsp; &nbsp;1633 <br />16341635 <label for="groupadd">1636 <input id="groupadd" type="radio" class="radio" name="cmd" value="groupadd"1637 onclick="javascript:tableRowElem('QuickAddOptionsRow');">1638 Quick-Add Selected <span id="selCount2"></span>&nbsp;Files1639 <?php writeHelp("Drafts :: Quick-add Selected"); ?>1640 </input>1641 </label>16421643 </td><td> <input class="submit" type="submit" value=" Perform! "></input>16441645 </td></tr>1646 <tr id="QuickAddOptionsRow" style="display:none; text-align: left;">1647 <td colspan="3">1648 <div class="method" style="background-color: #F0F8FF; margin-top: 15px; margin-left: 20px;">1649 <span class="name" style="background-color: #E0E8EE;">1650 <span class="lightdot">&#149;</span>1651 Common options for quick-adding photos:1652 </span>1653 <br />1654 <table width="100%" style="position: relative;">1655 <tr><td>Time Added<?php writeHelp("Photo: Time Added"); ?>:</td>1656 <td><input name="dateadd" id="dateadd" type="text" class="text" size="21" value="<?php echo $gooddate; ?>" autocomplete="off"></input></td>1657 </td><td>1658 <td>Default Categ<?php writeHelp("Photo: Default Categ"); ?>:</td>1659 <td><span style="margin-left: 10px"></span><select name="categ" class="select" size="1">1660 <?php1661 $categs2 = $categs;1662 reset($categs2);1663 while (list($cid, $cvals) = each($categs2))1664 if (is_array($cvals)) {1665 $prv = (strlen($cvals['pass']))?'* ':'';1666 echo "\t\t\t\t\t\t\t\t<option value=\"$cid\">".$cid.": ".$prv.cutNeck($cvals['name'])."</option>\n";1667 }1668 ?>1669 </input></td>1670 </tr><tr>1671 <td>Get Comment<?php writeHelp("Photo: Get Comments"); ?>:</td>1672 <td><span style="margin-left: 5px "></span><label for="getcmntsye"><input id="getcmntsye" checked="checked" name="getcmnts" value="yes" type="radio" class="radio">Yes</input></label>1673 <span style="margin-left: 25px"></span><label for="getcmntsno"><input id="getcmntsno" name="getcmnts" value="no" type="radio" class="radio">No</input></label></td>1674 </td><td>1675 <td>Default Story<?php writeHelp("Photo: Default Story"); ?>:</td>1676 <td><span style="margin-left: 10px"></span><select name="story" class="select" size="1">1677 <?php1678 $stories2 = array_reverse($stories, true);1679 array_pop($stories2);1680 array_pop($stories2);1681 $stories2 = array(1 => $stories[1]) + $stories2;1682 reset($stories2);1683 while (list($sid, $svals) = each($stories2))1684 if (is_array($svals)) {1685 $prv = (strlen($svals['pass']))?'* ':'';1686 echo "\t\t\t\t\t\t\t\t<option ".($sel?"selected=\"selected\"":"")."value=\"$sid\">".$sid.": ".$prv.cutNeck($svals['name'])."</option>\n";1687 }1688 ?>1689 </input></td></tr>16901691 </table>1692 </div>1693 </td>1694 </tr></table></center>1695 </td>1696 </tr>16971698 <tr style="background-color: #DDD; color: #444;"><td colspan="4" style="padding: 0px 0px 0px 15px;">1699 Select:1700 &nbsp; [ <a class="qp" onclick="javascript:DraftsSelectBit(0, 1);"> All </a> ]1701 &nbsp; [ <a class="qp" onclick="javascript:DraftsSelectBit(0, 0);"> None </a> ]1702 &nbsp; [ <a class="qp" onclick="javascript:DraftsSelectBit(1, 1);"> Reverse </a> ]1703 </td></tr>17041705 <tr style="background-color: #9AB; color: white; text-align: center;">1706 <td width="10%" style="border: 1px solid #666; ">Select</td>1707 <td width="20%" style="border: 1px solid #666; ">Thumbnail1708 <?php writeHelp('Manage Drafts: Thumbnail', '#DDD'); ?> </td>1709 <td width="50%" style="border: 1px solid #666; ">Information1710 <?php writeHelp('Manage Drafts: Information','#DDD'); ?> </td>1711 <td width="20%" style="border: 1px solid #666; ">Action1712 <?php writeHelp('Manage Drafts: Action', '#DDD'); ?> </td>1713 </tr>1714<?php1715 $n = 0;1716 if ($handle = opendir('temp')) {1717 while (false !== ($file = readdir($handle))) {1718 if ($file != "." && $file != ".." && !is_dir($file))1719 if (strcmp(substr($file, -6), "_9.jpg") == 0)1720 WriteDraftLine(substr($file, 0, strlen($file)-6), $n++);1721 }1722 closedir($handle);1723 }1724?>1725 <tr style="background-color: #F6F6F6; color: #444;"><td colspan="4" style="padding: 0px 0px 0px 15px; text-align: center;">1726 [ <a href="#top"> Back to Top </a> ]1727 </td></tr>1728 </table>1729 <script language="javascript" type="text/javascript">1730 updateSelCount();1731 </script>1732 </div> <!-- method -->17331734 </div> <!-- inside -->1735<?php } else { // if ($doUpload) ?>1736 <div class="inside">1737 <div class="method" style="text-align: left; padding-bottom: 15px; background-color: #F0F8FF;">1738 <span class="name"><a style="color: #111;" href="?page=drafts&cmd=doUpload">Upload Simultaneously</a>1739 <?php writeHelp("Upload Photos to Draft"); ?>:1740 </span><br />1741 <!-- <div id = "jj" style="border: 1px solid red">hi<br /></div> -->17421743<?php for ($i=0; $i<20; $i++) {1744 $t = 2; ?>1745 <div class="method" id="AddBox<?php echo $i; ?>"1746 style="padding-top: 8px; margin-bottom: 15px; display:<?php echo ($i < $t)?'block':'none'; ?>">1747 <?php $seed = random_seed(); ?>1748 <input type="hidden" id="seedv<?php echo $i; ?>" value="<?php echo $seed; ?>"></input>1749 <center>1750 <div class="note_wrapper" id="upload_uploading_<?php echo $seed; ?>" style="display: none; margin: 35px 0px 25px; position: relative;">1751 <span class="note_content" id="upload_note_<?php echo $seed; ?>">1752 <img src="files/adminfiles/ind.gif" class="ind" alt="" /> &nbsp; &nbsp; &nbsp;1753 <span id="upload_uploading_txt_<?php echo $seed; ?>">Preparing the process...</span>1754 </span>1755 </div>1756 </center>1757 <table width="100%" cellpadding="0" cellspacing="0" style="margin: 0px; padding:0px"><tr><td>1758 <iframe id="upload_iframe_<?php echo $seed; ?>" class="upload_iframes" src="<?php if ($i < $t ) echo "upload.php?draft=yes&seed=$seed"; ?>"1759 frameborder="0" scrolling="no" marginheight="0" marginwidth="0" height="80" width="100%">1760 </iframe>1761 </td></tr></table>1762 </div>1763<?php } ?>1764 <input type="hidden" id="boxv" value="<?php echo $t-1; ?>"></input>1765 <span class="AddAddBox">[ <a class="qp" onclick="javascrip:AddAddBox()">Add another Add-Box</a> ] </span>1766 <br />17671768 </div> <!-- method -->1769 <br />1770 </div> <!-- inside -->17711772<?php } // end of $doUpload ?>1773 </div> <!-- part -->1774<?php1775 }17761777 if (page_is('photos')) {1778 $comments = array();1779 $categs = array();1780 $stories = array();1781 $photos = array();1782 $basis = array();1783 parse_container('comments', 'Comment', 'data/comments.xml');1784 parse_container('categs', 'Category', 'data/categories.xml');1785 parse_container('stories', 'Story', 'data/stories.xml');1786 parse_container('photos', 'Photo', 'data/photos.xml');1787 parse_container('basis', 'Basis', 'data/basis.xml');1788 $edit = false;1789 $isdoAdd = false;1790 $ok_msg = '';1791 $alert_msg = '';1792 $cmd = '';1793 $pid = '';1794 $photo = array();17951796 if (isset($_GET['cmd'])) {1797 $cmd = $_GET['cmd'];1798 $isAdd = (strcmp($cmd, 'add') == 0);1799 $isEdt = (strcmp($cmd, 'edt') == 0);1800 $isdoAdd = (strcmp($cmd, 'doAdd') == 0);1801 $isdoEdt = (strcmp($cmd, 'doEdt') == 0);1802 $isadCat = (strcmp($cmd, 'adddelC') == 0);1803 $isadStr = (strcmp($cmd, 'adddelS') == 0);18041805 if ($isAdd)1806 $pid = ++$photos['lastpid'];1807 else1808 $pid = (isset($_GET ['pid'])?$_GET ['pid']:1809 (isset($_POST['pid'])?$_POST['pid']+0:-1));1810 $xmlfile = sprintf("data/p_%06d.xml", $pid);18111812 if (!($isAdd || $isdoAdd || isset($_GET['pid']) || isset($_POST['pid'])))1813 $alert_msg = "Unknown command or Pid.<br />Please enter PhotoID as pid for the command \"".$cmd."\"!";1814 else if ($isdoAdd)1815 ;1816 else if (strcmp($cmd, 'del') == 0) {1817 $ok_msg = "Photo \"".getPhotoInfo($pid, 'name')."\" (PID: $pid) deleted successfully!";1818 deletePhoto($pid);1819 }1820 else if (!$isAdd && !file_exists($xmlfile))1821 $alert_msg = "No photo with this PhotoID (pid: $pid) exists!";1822 else if ($isdoEdt) {1823 $edit = true;1824 parse_container('photo', '', $xmlfile);1825 $curppath = PHOTO_PATH.getImageFileName($pid, '9');1826 $curthumb = substr_replace($curppath, '3', -5, 1);1827 }1828 else if ($isAdd || $isEdt) {1829 if (!isset($_POST['name']))1830 $alert_msg = "No Name! You shall come here from administration page only!";1831 else {1832 if ($isEdt) {1833 parse_container('photo', '', $xmlfile);1834 if (($t = array_search($pid, $stories[$photo['story']]['photo'])) !== FALSE)1835 unset($stories[$photo['story']]['photo'][$t]);1836 if (($t = array_search($pid, $categs[$photo['categ']]['photo'])) !== FALSE)1837 unset($categs[$photo['categ']]['photo'][$t]);1838 $postfix = isset($photo['postfix'])?$photo['postfix']:'';1839 }1840 else1841 $postfix = $_POST['seed'];18421843 $photo = array('name' => $_POST['name'], 'desc' => $_POST['desc'],1844 'getcmnts' => $_POST['getcmnts'], 'dateadd' => $_POST['dateadd'],1845 'pid' => $pid, 'photoinfo' => $_POST['photoinfo'],1846 'categ' => $_POST['categ'], 'story' => $_POST['story'],1847 'datetake' => $_POST['datetake']1848 );1849 $photo['postfix'] = $postfix;18501851 if ($isAdd || !in_array($pid, $categs[$photo['categ']]['photo']))1852 array_push($categs[$photo['categ']]['photo'], $pid);1853 if ($isAdd || !in_array($pid, $stories[$photo['story']]['photo']))1854 array_push($stories[$photo['story']]['photo'], $pid);18551856 if (!isset($photos[$pid]))1857 $photos[$pid] = "";1858 $t = array();1859 $t = explode(" ", $photos[$pid]);1860 $photos[$pid] = $_POST['hits']." ".(isset($t[2])?$t[2]:date("Y/m/d-G:i:s", GetTimeWithDiffer()));18611862 $postfix = (strlen($postfix)?"_":"").$postfix;1863 $pid6let = sprintf("%06d%s_9.jpg", $pid, $postfix);1864 $ppath = PHOTO_PATH.$pid6let;1865 $curppath = $ppath;1866 $curthumb = substr_replace($ppath, '3', -5, 1);18671868 $reget = ($isEdt && isset($_POST['regetSrc']) && (strcmp($_POST['regetSrc'], 'get') == 0));1869 if ($reget)1870 for ($ind=0; $ind<10; $ind++)1871 if (file_exists(substr_replace($ppath, $ind, -5, 1)))1872 unlink(substr_replace($ppath, $ind, -5, 1));18731874 if ($isAdd || $reget)1875 $ppath = substr_replace($_POST['ImgUrl'], '9', -5, 1);18761877 if (!file_exists($ppath))1878 $alert_msg = "The photo is not exist in the <a href=\"$ppath\">expected place</a>!";1879 else {1880 if ($isAdd || $reget) {1881 copy($ppath, $curppath);1882 DeleteFromDrafts($ppath);1883 $ppath = PHOTO_PATH.$pid6let;1884 }1885 $gen3 = $isAdd || ($isEdt && (isset($_POST['genThumb'])) &&1886 (strcmp($_POST['genThumb'], "gen") == 0));1887 GenerateAddPhotoRequired($ppath, $gen3);1888 $ok_msg = "Photo \"<a href=\".?p=$pid\">".$photo['name']."</a>\" (pid: $pid) ".($isAdd?"added":"edited")." succesfully!";1889 save_container('photo', 'Photo', $xmlfile);1890 }1891 }1892 if (strlen($alert_msg) == 0) {1893 save_container('categs', 'Category', 'data/categories.xml');1894 save_container('stories', 'Story', 'data/stories.xml');1895 save_container('photos', 'Photo', 'data/photos.xml');1896 }1897 build_rss();1898 } // if !($isAdd || $isEdt) {1899 else if (!$isadCat && !$isadStr)1900 $alert_msg = $cmd.' is not a valid command!';1901 else {1902 $isCAdd = (strcmp($_GET['tcmd'], 'add') == 0);1903 $isCDel = (strcmp($_GET['tcmd'], 'del') == 0);1904 $photo = getAllPhotoInfo($pid);1905 $pname = $photo['name'];1906 if ($isadCat) {1907 $cid = $_GET['cid'];1908 $cname = isset($categs[$cid])?$categs[$cid]['name']:'';1909 if (!isset($categs[$cid]) || !is_array($categs[$cid]))1910 $alert_msg = "No category with this CategoryID ($cid) exists!";1911 else if ($isCDel && !in_array($pid, $categs[$cid]['photo']))1912 $alert_msg = "The Photo \"$pname\" (pid: $pid) is not in the Category \"$cname\" (cid: $cid)!";1913 else if ($isCDel && ($cid == $photo['categ']))1914 $alert_msg = "The Photo \"$pname\" (pid: $pid) can not be deleted from its default Category; "1915 ."Try <a href=\"?page=photos&cmd=doEdt&pid=$pid\">editing it</a>!";1916 else if ($isCAdd && in_array($pid, $categs[$cid]['photo']))1917 $alert_msg = "The Photo \"$pname\" (pid: $pid) is already added in the Category \"$cname\" (cid: $cid)!";1918 else {1919 if ($isCAdd) {1920 array_push($categs[$cid]['photo'], $pid);1921 $ok_msg = "The Photo \"$pname\" (pid: $pid) added to Category \"$cname\" (cid: $cid), successfully!"1922 ." [<a title=\"Delete it!\" href=\"admin.php?page=photos&cmd=adddelC&tcmd=del&cid=$cid&pid=$pid\">undo!</a>]";1923 }1924 else {1925 unset($categs[$cid]['photo'][array_search($pid, $categs[$cid]['photo'])]);1926 $ok_msg = "The Photo \"$pname\" (pid: $pid) removed from Category \"$cname\" (cid: $cid), successfully!"1927 ." [<a title=\"Add again!\" href=\"admin.php?page=photos&cmd=adddelC&tcmd=add&cid=$cid&pid=$pid\">undo!</a>]";1928 }1929 save_container('categs', 'Category', 'data/categories.xml');1930 }1931 }1932 else {1933 $sid = $_GET['cid'];1934 $sname = isset($stories[$sid])?$stories[$sid]['name']:'';1935 if (!isset($stories[$sid]) || !is_array($stories[$sid]))1936 $alert_msg = "No story with this StoryID ($sid) exists!";1937 else if ($isCDel && !in_array($pid, $stories[$sid]['photo']))1938 $alert_msg = "The Photo \"$pname\" (pid: $pid) is not in the Story \"$sname\" (sid: $sid)!";1939 else if ($isCDel && ($sid == $photo['story']))1940 $alert_msg = "The Photo \"$pname\" (pid: $pid) can not be deleted from its default Story; "1941 ."Try <a href=\"?page=photos&cmd=doEdt&pid=$pid\">editing it</a>!";1942 else if ($isCAdd && in_array($pid, $stories[$sid]['photo']))1943 $alert_msg = "The Photo \"$pname\" (pid: $pid) is already added in the Story \"$sname\" (sid: $sid)!";1944 else {1945 if ($isCAdd) {1946 array_push($stories[$sid]['photo'], $pid);1947 $ok_msg = "The Photo \"$pname\" (pid: $pid) added to Story \"$sname\" (sid: $sid), successfully!"1948 ." [<a title=\"Delete it!\" href=\"admin.php?page=photos&cmd=adddelS&tcmd=del&cid=$sid&pid=$pid\">undo!</a>]";;1949 }1950 else {1951 unset($stories[$sid]['photo'][array_search($pid, $stories[$sid]['photo'])]);1952 $ok_msg = "The Photo \"$pname\" (pid: $pid) removed from Story \"$sname\" (sid: $sid), successfully!"1953 ." [<a title=\"Add again!\" href=\"admin.php?page=photos&cmd=adddelS&tcmd=add&cid=$sid&pid=$pid\">undo!</a>]";;1954 }1955 save_container('stories', 'Story', 'data/stories.xml');1956 }1957 }1958 }1959 }1960 $edit &= !strlen($alert_msg);1961 $SklH = 75;1962 $SklW = $SklH;1963 $n = isset($_GET['n'])?$_GET['n']:7;19641965 $draft = (isset($_GET['draft']))?$_GET['draft']:"";1966 $isDraft = (strlen($draft) > 0);19671968 $showConsole = !$edit && !$isdoAdd;19691970 $lastp = $photos['lastpid'];1971 $dateTakenPrev = date("Y/m/d");1972 $storyPrev = 1;1973 $categPrev = 1;1974 $cmntsPrev = "yes";1975 if (photo_exists($lastp)) {1976 $dates = sscanf(getPhotoInfo($lastp, 'dateadd'), "%d/%d/%d %d:%d");1977 $dif = 0;1978 @ eval('$dif = '.$basis['timediffer'].';');1979 $d = time() + $dif*60;1980 if ($d - mktime($dates[3], $dates[4], 0, $dates[1], $dates[2], $dates[0])1981 < 60*60) // added within last one hour1982 $dateTakenPrev = getPhotoInfo($lastp, 'datetake');1983 $storyPrev = getPhotoInfo($lastp, 'story');1984 $categPrev = getPhotoInfo($lastp, 'categ');1985 $cmntsPrev = getPhotoInfo($lastp, 'getcmnts');1986 }1987 $curHits = '0 0/0';1988 if ($edit) {1989 $t = array();1990 $t = explode(" ", $photos[$pid]);1991 $curHits = $t[0]." ".$t[1];1992 }1993 $cmntsDefault = (strcmp($cmntsPrev, "yes") == 0);1994 if ($edit)1995 $cmntsDefault = (strcmp($photo['getcmnts'], "yes") == 0);19961997 $gooddate = date("Y/m/d H:i", GetTimeWithDiffer());199819992000 //print_r($photos);2001?>2002 <script type="text/javascript" language="javascript" src="files/adminfiles/addphoto.js"></script>2003 <script lanugage="javascript" type="text/javascript">2004 var hasexif = <?php echo $hasexif; ?>;2005 </script>20062007 <div class="back2mainR"><a target="_blank" href=".">&nbsp;View Gallery &gt;&gt; </a></div>2008 <div class="back2main"><a href="?">&nbsp;&nbsp;&lt;&lt; Admin Page&nbsp;&nbsp;&nbsp;</a></div>2009 <noscript>2010 <br />2011 <div class="method"><div class="note_invalid">Please activate javascript for the proper performance.</div></div>2012 </noscript>2013<?php if (!$showConsole) { ?>2014 <div class="clearer" style="margin-top: 15px;"> </div>2015 <div class="back2main"><span style="padding-left: 13px"></span><a href="?page=photos"><< Manage Photos</a></div>2016<?php2017 }2018 if (strlen($alert_msg)) echo "\t\t\t<div class=\"method\" style=\"margin-top: 20px;\"><div class=\"note_invalid\">$alert_msg</div></div>";2019 if (strlen($ok_msg)) echo "\t\t\t<div class=\"method\" style=\"margin-top: 20px;\"><div class=\"note_valid\">$ok_msg</div></div>";2020 if ($isdoAdd) echo "\t\t\t<script language=\"javascript\" type=\"text/javascript\">setFakeDate(1);</script>\n";2021 if ($showConsole) {2022?>2023 <div class="part">2024 <div class="title"><a style="color: white" href="?page=photos">Manage Photos:</a></div>2025 <div class="inside">2026 <table width="100%" cellspacing="0" cellpadding="0" style="position: relative;"><tr>2027 <td width="26%" valign="top">2028 <div class="method" style="margin-bottom: 5px; padding: 0px 0px 12px 15px;">2029 <span class="name">2030 <span class="lightdot">&#149;</span>2031 Add photo2032 <?php writeHelp("Add Photo Link"); ?>:2033 </span><br />2034 <span class="dot" style="margin-left: -7px;"><b>:</b></span>2035 <a href="?page=photos&cmd=doAdd">Add a Photo!</a>2036 <span style="color:#999;">&nbsp;[ <a href="?page=drafts">From Drafts </a> ]</span>2037 </div>2038 </td>2039 <td width="24%" valign="top">2040 <form method="get" action="?" onsubmit="return true;">2041 <input type="hidden" name="page" value="photos"></input>2042 <input type="hidden" name="cmd" value="doEdt"></input>2043 <div class="method" style="margin-bottom: 5px; padding: 0px 0px 12px 15px;">2044 <span class="name">Edit Later Photos2045 <?php writeHelp("Edit Photos Link"); ?>:2046 </span><br />2047 <span class="dot" style="margin-left: -7px;"><b>:</b></span>2048 <label>Photo2049 <input style="margin: 0px;" name="pid" class="text" size="4" type="text"2050 value="<?php echo (strlen($ok_msg) || strlen($alert_msg))?$pid:''; ?>" autocomplete="off"></input>2051 </label>2052 &nbsp;2053 <input class="submit" type="submit" value=" Edit! "></input>2054 </div>2055 </form>2056 </td>2057 <td width="52%" valign="top">2058 <form method="get" action="?" onsubmit="return true;" >2059 <input type="hidden" name="page" value="photos"></input>2060 <input type="hidden" name="cmd" value="doEdt"></input>2061 <div class="method" style="margin-bottom: 5px; padding: 0px 0px 12px 15px;">2062 <span class="name">Add/Delete Photos to Story/Categs2063 <?php writeHelp("Add/Del Photos to Categ/Story"); ?>:2064 </span><br />2065 <span class="dot" style="margin-left: -7px;"><b>:</b></span>2066 <select name="tcmd" class="select" type="text"2067 onchange="javascript:dg('ToField').style.display=(this.value=='add')?'inline':'none';dg('FromField').style.display=(this.value=='del')?'inline':'none'">2068 <option value="add" selected="selected">Add</option>2069 <option value="del">Del</option>2070 </select>2071 &nbsp;2072 <label>Photo2073 <input style="margin: 0px" name="pid" class="text" size="3" type="text"2074 value="<?php echo (strlen($ok_msg) || strlen($alert_msg))?$pid:''; ?>" autocomplete="off"></input>2075 </label>20762077 &nbsp;<label><span id="ToField" style="display:inline">To</span><span id="FromField" style="display:none">From</span>20782079 <select name="cmd" class="select" type="text">2080 <option value="adddelC" selected="selected">Categ</option>2081 <option value="adddelS">Story</option>2082 </select>2083 </label>20842085 <label>#2086 <input style="margin: 0px;" name="cid" class="text" size="3" type="text"2087 value="<?php echo (strlen($ok_msg) || strlen($alert_msg))?$cid:''; ?>" autocomplete="off"></input>2088 </label>2089 &nbsp;2090 <input class="submit" type="submit" id="AddDelCSubmit" value=" Do! "></input>2091 </div>2092 </form>2093 </td>2094 </tr>2095 </table>2096 <br style="margin-top: 3px; " />2097 <div class="method">2098 <span class="name">2099 <span class="lightdot">&#149;</span>2100 <b>Edit</b> Photo ::2101 <?php echo $n; ?>2102 Recent :2103<?php2104 foreach (array(7, 14, 21, 35, 70, 140, 700, 7000) as $k)2105 echo "\t\t\t\t\t\t<a href=\"?page=photos&n=$k\">[$k]</a>\n";21062107?>2108 </span><br />21092110 <div style="margin-left: -10px;">2111<?php2112 $cur = end($photos);2113 for ($i=min(count($photos), $n); $i>0; $i--) {2114 $thePid = key($photos);2115 if (strcmp("lastpid", $thePid) != 0) {2116 echo "\t<div class=\"aThumbToEdit\">\n";2117 thumbBox($thePid, '', true, true);21182119 echo "\t\t<a href=\"?page=photos&cmd=doEdt&pid=$thePid\">Edit</a>\n"2120 ."\t\t<span class=\"dot\">::</span>\n"2121 ."\t\t<a href=\"?page=photos&cmd=del&pid=$thePid\""2122 ." onclick=\"javascript: return ConfirmDelPhotoID(".$thePid.");\">Delete</a>\n"2123 ."\t</div>\n";2124 $cur = prev($photos);2125 }2126 }2127?>2128 <div class="clearer"> </div>2129 </div>2130 </div>2131 </div>2132 </div>2133<?php2134 }2135 else { // !showConsole2136 if ($edit)2137 $seed = isset($photo['postfix'])?$photo['postfix']:"";2138 else2139 $seed = random_seed();2140?>2141 <form name="TheGlobalForm" enctype="multipart/form-data" method="post" action="?page=photos&cmd=<?php echo $edit?'edt':'add'; ?>" onsubmit="return CheckAddPhoto<?php echo $edit?'Time':''; ?>();">2142 <input name="ImgUrl" id="theImgPath" class="text" size="40" type="hidden" readonly="readonly" value="<?php echo $edit?PHOTO_PATH.getImageFileName($pid, '9'):""; ?>"></input>2143 <input name="seed" id="inputSeed" class="text" size="20" type="hidden" readonly="readonly" value="<?php echo $seed; ?>"></input>2144 <div class="part" style="margin-top: 22px;">2145 <span class="title">&#149; <a style="color: white" href="?page=photos<?php2146 echo $edit?"&cmd=doEdt&pid=$pid":'&cmd=doAdd'; ?><?php2147 echo $isDraft?"&draft=$draft":""?>"><?php2148 echo $edit?"Edit Photo #$pid \"".$photo['name']."\"":2149 ($isDraft?"Add Draft item $draft":'Add Photo'); ?>:</a></span>2150 <?php if ($edit) { ?>2151 <input name="pid" class="text" size="6" type="hidden" value="<?php echo $pid; ?>"></input>2152 <br /><br />2153 <?php } else { ?>2154 <div class="inside">2155 <?php }2156 if (!$isDraft) {2157 if ($edit) { ?>2158 <center>2159 <table width="96%" cellspacing="0" cellpadding="0" style="position: relative; text-align: left;">2160 <tr><td width="50%" id="photoinfDiv0">2161 <div class="method">2162 <span class="name">Step 0 - Photo Information:2163 </span>21642165 <div style="float:left; margin-right: 20px; border-right: 1px dashed #999; padding-right: 20px; ">2166 <?php2167 $imgFile = PHOTO_PATH.getImageFileName($pid, '3');2168 if (!file_exists($imgFile) && !$hasgd)2169 $imgFile = PHOTO_PATH.getImageFileName($pid, '9');21702171 echo "<a href=\".?p=$pid\" target=\"_blank\"><img src=\"$imgFile\" /></a>";21722173 //thumbBox($pid, '', true, true);2174 ?>2175 </div>2176 <br />2177 You're editing:<br />21782179 <?php echo "Photo #$pid : <br /><b>\"".$photo['name']."\"</b>"; ?>21802181 <br />2182 <span class="dot">&#149;</span>2183 <a href="?page=photos&cmd=del&pid=<?php echo $pid; ?>"2184 onclick="javascript: return ConfirmDelPhotoID(<?php echo $pid; ?>);">2185 Delete This Photo!2186 </a>2187 <br />2188 </div>21892190 </td>2191 <td>2192 <?php } /* $edit; */ ?>21932194 <div class="method" id="contUploadNow">2195 <span class="name">Step 1 - Locate the Photo2196 <?php echo writeHelp("Upload Path"); ?>:2197 </span>2198 <?php if ($edit) { ?>2199 <div style="padding: 15px 20px 17px; line-height: 100%;">2200 <label for="regetSrcno"><input id="regetSrcno" type="radio" class="radio" name="regetSrc" value="noget" checked="checked" onclick="javascript:showElem('ThumbnailGenSelector');hideElem('gettingTheFileDiv');TheGlobalForm.genThumb[0].checked=true;hideElem('ThumbnailGenerator');inlineElem('photoinfDiv0')">Keep current file</input></label><br />2201 <br />2202 <label for="regetSrcye"><input id="regetSrcye" type="radio" class="radio" name="regetSrc" value="get" onclick="javascript:hideElem('ThumbnailGenSelector');TheGlobalForm.genThumb[1].checked=true;showElem('ThumbnailGenerator');showElem('gettingTheFileDiv');hideElem('photoinfDiv0')">Upload a new file</input></label><br />2203 </div>2204 <?php } ?>2205 <div id="gettingTheFileDiv" style="display: <?php echo $edit?"none":"block"; ?>">2206 <center>2207 <div class="note_wrapper" id="upload_uploading_<?php echo $seed; ?>" style="display: none; margin: 27px 0px; position: relative;">2208 <span class="note_content" id="upload_note_<?php echo $seed; ?>">2209 <img src="files/adminfiles/ind.gif" class="ind" alt="" /> &nbsp; &nbsp; &nbsp; <span id="upload_uploading_txt_<?php echo $seed; ?>">Preparing the process...</span>2210 </span>2211 </div>2212 </center>2213 <iframe id="upload_iframe_<?php echo $seed; ?>" class="upload_iframes" src="upload.php?seed=<?php echo $seed; ?>" frameborder="0"2214 scrolling="no" marginheight="0" marginwidth="0" height="80" width="90%">2215 </iframe>2216 </div> <!-- gettingTheFileDiv -->2217 </div> <!-- method -->22182219 <?php if ($edit) { ?>2220 </td></tr></table>2221 </center>2222 <?php } else { ?>2223 </div> <!-- inside -->2224 <?php } ?>222522262227 <div class="inside">2228 <?php } /* !$isDraft */ ?>2229 <table width="100%" cellspacing="0" cellpadding="0" style="position: relative;"><tr>2230 <td width="50%" valign="top">2231 <div class="method">2232 <span class="name">Step 2.1 - Global data (required)2233 <?php writeHelp("Photo: Global Data"); ?>2234 :</span><br />2235 <table width="100%" cellpadding="3">2236 <tr><td>Title<?php writeHelp("Photo: Title"); ?>:</td>2237 <td><input id="PhotoTitleId" name="name" type="text" class="text" size="28" value="<?php echo $edit?$photo['name']:($isDraft?$draft:''); ?>" autocomplete="off"></input></td></tr>2238 <tr><td valign="top">Description<?php writeHelp("Photo: Description"); ?>:</td>2239 <td><textarea cols="17" rows="5" name="desc"><?php echo $edit?$photo['desc']:''; ?></textarea></td></tr>2240 <tr><td>Time Added<?php writeHelp("Photo: Time Added"); ?>:</td>2241 <td><input name="dateadd" id="dateadd" type="text" class="text" size="21" value="<?php echo $edit?$photo['dateadd']:$gooddate; ?>" autocomplete="off"></input></td></tr>2242 <tr><td>Get Comment<?php writeHelp("Photo: Get Comments"); ?>:</td>2243 <td><span style="margin-left: 5px "></span><label for="getcmntsye"><input id="getcmntsye" <?php echo ($cmntsDefault)?'checked="checked"':''; ?> name="getcmnts" value="yes" type="radio" class="radio">Yes</input></label>2244 <span style="margin-left: 25px"></span><label for="getcmntsno"><input id="getcmntsno" <?php echo ($cmntsDefault)?'':'checked="checked"'; ?> name="getcmnts" value="no" type="radio" class="radio">No</input></label></td></tr>2245 </table>2246 </div>2247 </td>2248 <td width="50%" valign="top">2249 <div class="method">2250 <span class="name">Step 2.2 - Special features (optional):</span>2251 <table width="100%" cellpadding="4" cellspacing="1">2252 <tr><td valign="top">Photo info<?php writeHelp("Photo: Photo Info"); ?>:</td>2253 <td><textarea cols="16" rows="3" id="photoinfo" name="photoinfo"><?php echo $edit?$photo['photoinfo']:''; ?></textarea></td></tr>2254 <tr><td>Default Categ<?php writeHelp("Photo: Default Categ"); ?>:</td>2255 <td><span style="margin-left: 10px"></span><select name="categ" class="select" size="1">2256 <?php2257 $categs2 = $categs;2258 reset($categs2);2259 while (list($cid, $cvals) = each($categs2))2260 if (is_array($cvals)) {2261 $prv = (strlen($cvals['pass']))?'* ':'';2262 $sel = $edit?($cid == $photo['categ']):($cid == $categPrev);2263 echo "\t\t\t\t\t\t\t\t<option ".($sel?"selected=\"selected\"":"")."value=\"$cid\">".$cid.": ".$prv.cutNeck($cvals['name'])."</option>\n";2264 }2265 ?>2266 </input></td></tr>2267 <tr><td>Default Story<?php writeHelp("Photo: Default Story"); ?>:</td>2268 <td><span style="margin-left: 10px"></span><select name="story" class="select" size="1">2269 <?php2270 $stories2 = array_reverse($stories, true);2271 array_pop($stories2);2272 array_pop($stories2);2273 $stories2 = array(1 => $stories[1]) + $stories2;2274 reset($stories2);2275 while (list($sid, $svals) = each($stories2))2276 if (is_array($svals)) {2277 $prv = (strlen($svals['pass']))?'* ':'';2278 $sel = $edit?($sid == $photo['story']):($sid == $storyPrev);2279 echo "\t\t\t\t\t\t\t\t<option ".($sel?"selected=\"selected\"":"")."value=\"$sid\">".$sid.": ".$prv.cutNeck($svals['name'])."</option>\n";2280 }2281 ?>2282 </input></td></tr>2283 <tr><td>Date Taken<?php writeHelp("Photo: Date Taken"); ?>:</td>2284 <td><input id="datetake" name="datetake" type="text" class="text" size="21" onchange="javascript:setFakeDate(0);" value="<?php echo $edit?$photo['datetake']:$dateTakenPrev; ?>"></input></td></tr>2285 <tr><td>Hits & Rate<?php writeHelp("Photo: Hits, Rate"); ?>:</td>2286 <td><input id="hits" name="hits" type="text" class="text" size="21" value="<?php echo $curHits; ?>" autocomplete="off"></input></td></tr>2287 </table>2288 </div>2289 </td>2290 </tr></table>2291 </div>2292 <a name="genThumb"></a>2293 <div class="inside">2294 <div class="method">2295 <span class="name">Step 3 - Thumbnail<?php writeHelp("Thumbnail"); ?>:</span><br />2296 <?php if ($edit) { ?>2297 <div id="ThumbnailGenSelector">2298 <label for="genThumbnogen"><input type="radio" class="radio" name="genThumb" value="nogen" id="genThumbnogen" checked="checked" onclick="javascript:hideElem('ThumbnailGenerator');showElem('currentThumb');"> Keep current thumbnail</input></label><br />2299 <div id="currentThumb" style="margin: 5px 50px 10px;"><img border="1" src="<?php echo $curthumb; ?>" /></div>2300 <label for="genThumbgen"><input type="radio" class="radio" name="genThumb" value="gen" id="genThumbgen" onclick="javascript:showElem('ThumbnailGenerator');hideElem('currentThumb');">Generate a new thumbnail</input></label><br />2301 </div>2302 <?php } ?>2303 <center>2304 <div class="note_wrapper" id="thumb_note_wrapper_<?php echo $seed; ?>"<?php if ($edit || $isDraft) echo " style=\"display: none;\""; ?>>2305 <span class="note_content" id="thumb_note_<?php echo $seed; ?>">You have not uploaded anything! do it first. </span>2306 </div>2307 <div id="ThumbnailGenerator" style="display: none; padding: 5px; margin: 10px 0px;">2308 <center>2309 <table width="90%" cellspacing="0" cellpadding="0" style="position: relative; "><tr> ...

Full Screen

Full Screen

configuration.php

Source:configuration.php Github

copy

Full Screen

...26 $xunit->addWriter($writer);27 $runner->addReport($xunit);28}29$callback = function ($script, $argument, $values) {30 $script->writeHelp('Available environment variables are:');31 $script->writeHelp(' TELEMETRY_ENABLED : If set, it sends information to telemetry.');32 $script->writeHelp(' More information about this on http://atoum.org/news/2016/05/17/here-comes-the-telemetry.html.');33 $script->writeHelp(' Available values are :');34 $script->writeHelp(' 0 : no report will be sent (default)');35 $script->writeHelp(' 1 : send report anonymously');36 $script->writeHelp(' 2 : send report with your vendor name (from your composer.json file)');37 $script->writeHelp(' 3 : send report with both vendor and projet name (from your composer.json file)');38 $script->writeHelp(' XUNIT_REPORT_PATH : Path to a file to write an xUnit report.');39};40$script->getArgumentsParser()->addHandler($callback, ['--help', '-h']);41if (class_exists('mageekguy\atoum\autoloop\extension') && $composerFile->exists()) {42 $runner43 ->getExtension(mageekguy\atoum\autoloop\extension::class)44 ->setWatchedFiles($composerFile->listAbsoluteAutoloadPaths())45 ;46}...

Full Screen

Full Screen

writeHelp

Using AI Code Generation

copy

Full Screen

1$script = new Script("1.php");2$script->writeHelp();3$script = new Script("2.php");4$script->writeHelp();5$script = new Script("3.php");6$script->writeHelp();7$script = new Script("4.php");8$script->writeHelp();9$script = new Script("5.php");10$script->writeHelp();11$script = new Script("6.php");12$script->writeHelp();13$script = new Script("7.php");14$script->writeHelp();15$script = new Script("8.php");16$script->writeHelp();17$script = new Script("9.php");18$script->writeHelp();19$script = new Script("10.php");20$script->writeHelp();21$script = new Script("11.php");22$script->writeHelp();23$script = new Script("12.php");24$script->writeHelp();25$script = new Script("13.php");26$script->writeHelp();27$script = new Script("14.php");28$script->writeHelp();29$script = new Script("15.php");30$script->writeHelp();

Full Screen

Full Screen

writeHelp

Using AI Code Generation

copy

Full Screen

1$script = new Script();2$script->writeHelp();3$script = new Script();4$script->writeHelp();5$script = new Script();6$script->writeHelp();7$script = new Script();8$script->writeHelp();9$script = new Script();10$script->writeHelp();11$script = new Script();12$script->writeHelp();13$script = new Script();14$script->writeHelp();15$script = new Script();16$script->writeHelp();17$script = new Script();18$script->writeHelp();

Full Screen

Full Screen

writeHelp

Using AI Code Generation

copy

Full Screen

1require_once('script.php');2$script = new script();3$script->writeHelp();4require_once('script.php');5$script = new script();6$script->writeHelp();7require_once('script.php');8$script = new script();9$script->writeHelp();

Full Screen

Full Screen

writeHelp

Using AI Code Generation

copy

Full Screen

1$script = new script();2$script->writeHelp();3$script = new script();4$script->writeHelp();5$script = new script();6$script->writeHelp();7$script = new script();8$script->writeHelp();9$script = new script();10$script->writeHelp();11$script = new script();12$script->writeHelp();13$script = new script();14$script->writeHelp();15$script = new script();16$script->writeHelp();17$script = new script();18$script->writeHelp();19$script = new script();20$script->writeHelp();21$script = new script();22$script->writeHelp();23$script = new script();24$script->writeHelp();25$script = new script();26$script->writeHelp();27$script = new script();28$script->writeHelp();29$script = new script();30$script->writeHelp();31$script = new script();32$script->writeHelp();33$script = new script();34$script->writeHelp();

Full Screen

Full Screen

writeHelp

Using AI Code Generation

copy

Full Screen

1$obj = new Script;2$obj->writeHelp();3$obj = new Script;4$obj->writeHelp();5$obj = new Script;6$obj->writeHelp();7$obj = new Script;8$obj->writeHelp();9$obj = new Script;10$obj->writeHelp();11$obj = new Script;12$obj->writeHelp();13$obj = new Script;14$obj->writeHelp();15$obj = new Script;16$obj->writeHelp();17$obj = new Script;18$obj->writeHelp();19$obj = new Script;20$obj->writeHelp();21$obj = new Script;22$obj->writeHelp();23$obj = new Script;24$obj->writeHelp();25$obj = new Script;26$obj->writeHelp();27$obj = new Script;28$obj->writeHelp();29$obj = new Script;30$obj->writeHelp();31$obj = new Script;32$obj->writeHelp();33$obj = new Script;34$obj->writeHelp();35$obj = new Script;36$obj->writeHelp();

Full Screen

Full Screen

writeHelp

Using AI Code Generation

copy

Full Screen

1$script = new script();2$script->writeHelp();3$script = new script();4$script->writeHelp();5require_once('1.php');6$script = new script();7$script->writeHelp();8$script = new script();9$script->writeHelp();10require_once('1.php');11require_once('1.php');12require_once('1.php');

Full Screen

Full Screen

writeHelp

Using AI Code Generation

copy

Full Screen

1$script->writeHelp();2$script->writeHelp();3require_once 'script.php';4$script = new script();5$script->addOption('a', 'apple', 'apple option');6$script->writeHelp();7require_once 'script.php';8$script = new script();9$script->addOption('b', 'banana', 'banana option');10$script->writeHelp();11require_once 'script.php';12$script = script::getInstance();13$script->addOption('a', 'apple', 'apple option');14$script->writeHelp();15require_once 'script.php';16$script = script::getInstance();

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Atoum automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Trigger writeHelp code on LambdaTest Cloud Grid

Execute automation tests with writeHelp on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.

Test now for Free

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful