function form($name = '', $desc = '', $screen = -1, $idn = 0) { ?> <script type="text/javascript" src="admin/files.js"> </script> <form action="<?php echo htmlentities($_SERVER['REQUEST_URI']); ?> " method="post" id="form"> <label for="shot_name">Name:</label> <input type="text" maxlength="100" size=70 name="shot_name" id="shot_name"<?php echo !empty($name) ? " value=\"{$name}\"" : ''; ?> /><br /> <label for="shot_desc">Description:</label> <input type="text" maxlength="255" size=100 name="shot_desc" id="shot_desc"<?php echo !empty($desc) ? " value=\"{$desc}\"" : ''; ?> /><br /> <label for="shot_screen_disp">Screenshot:</label> <input type="text" name="shot_screen_disp" readonly=true size=60 id="shot_screen_disp" value="<?php echo htmlentities(stripslashes(getFileName($screen))); ?> " /> <input type="hidden" name="shot_screen" id="shot_screen" value="<?php echo getFileID($screen); ?> " /><br /> <input type="button" onclick="javascript:switchVisibility('shot_screen',-1)" value='Pick a file' /><br /> <div id="shot_screen_div" style="display: none;"> <iframe src="" id="shot_screen_frame" width=600 ></iframe> </div><br /> <?php if ($idn != 0) { ?> <input type="hidden" name="id" value="<?php echo $idn; ?> " /> <?php } ?> <input type="submit" /> </form> <?php }
function form($name = '', $desc = '', $author = '', $version = '', $platform = '', $requires = '', $screen = -1, $file = -1, $idn = -1) { ?> <script type="text/javascript" src="admin/files.js"> </script> <form action="<?php echo htmlentities($_SERVER['REQUEST_URI']); ?> " method="post" id="form"> <label for="plugin_name">Name:</label> <input type="text" maxlength="100" size=70 name="plugin_name" id="plugin_name"<?php echo !empty($name) ? " value=\"{$name}\"" : ''; ?> /><br /> <label for="plugin_desc">Description:</label> <input type="text" maxlength="255" size=100 name="plugin_desc" id="plugin_desc"<?php echo !empty($desc) ? " value=\"{$desc}\"" : ''; ?> /><br /> <label for="plugin_author">Author:</label> <input type="text" maxlength="100" name="plugin_author" id="plugin_author"<?php echo !empty($author) ? " value=\"{$author}\"" : ''; ?> /><br /> <label for="plugin_version">Version:</label> <input type="text" maxlength="20" name="plugin_version" id="plugin_version"<?php echo !empty($version) ? " value=\"{$version}\"" : ''; ?> /><br /> <label for="plugin_platform">Platform/OS:</label> <input type="text" maxlength="50" name="plugin_platform" id="plugin_platform"<?php echo !empty($platform) ? " value=\"{$platform}\"" : ''; ?> /><br /> <label for="plugin_requires">Requires:</label> <input type="text" maxlength="50" name="plugin_requires" id="plugin_requires"<?php echo !empty($requires) ? " value=\"{$requires}\"" : ''; ?> /><br /> <label for="plugin_screen_disp">Screenshot:</label> <input type="text" name="plugin_screen_disp" readonly=true size=60 id="plugin_screen_disp" value="<?php echo htmlentities(stripslashes(getFileName($screen))); ?> " /> <input type="hidden" name="plugin_screen" id="plugin_screen" value="<?php echo getFileID($screen); ?> " /><br /> <input type="button" onclick="javascript:switchVisibility('plugin_screen',-1)" value='Pick a file' /><br /> <div id="plugin_screen_div" style="display: none;"> <iframe src="" id="plugin_screen_frame" width=600 ></iframe> </div><br /> <label for="plugin_file_disp">File:</label> <input type="text" name="plugin_file_disp" readonly=true size=60 id="plugin_file_disp" value="<?php echo htmlentities(stripslashes(getFileName($file))); ?> " /> <input type="hidden" name="plugin_file" id="plugin_file" value="<?php echo getFileID($file); ?> " /><br /> <input type="button" onclick="javascript:switchVisibility('plugin_file',-1)" value='Pick a file' /><br /> <div id="plugin_file_div" style="display: none;"> <iframe src="" id="plugin_file_frame" width=600 ></iframe> </div><br /> <?php if ($idn != 0) { ?> <input type="hidden" name="id" value="<?php echo $idn; ?> " /> <?php } ?> <input type="submit" /> </form> <?php }