Location: PHPKode > projects > WorkOrder TS > workorder-ts/include/upload_img_ui.php
<?PHP if( isset($_GET['TicketID']) ) { $TicketID=addslashes($_GET['TicketID']);} else { die("This script can not be called directly");} if( isset($_GET['SSID']) ) { $SSID=addslashes($_GET['SSID']);} else { die("This script can not be called directly");} $inc_dir="./";$_Il6fL=NULL;require $inc_dir.'workorder_function_general.inc.php';$CONF=_OFB10($inc_dir);require_once $inc_dir.'workorder_function_isuserauthenticated.inc.php';if( _L00CR($SSID,$inc_dir,$_Il6fL,$CONF)=="FAILED" ) { die('Not Authenticated, please login first');} $_jLo0J=$CONF['UploadMaxSizeb'];$TableTicketImages=$CONF['TableNameTicketImages'];if( file_exists("$inc_dir/pro/calendar.php")==False ) { require $inc_dir.'config-guest.inc.php';require $inc_dir.'conn-string-guest.inc.php';$sql="SELECT COUNT(*) FROM $TableTicketImages WHERE TicketID = \"$TicketID\"";$res=mysql_query($sql,$conn) or die("Unable to get total count Error:xchv4<br /> $sql");$row=mysql_fetch_array($res);$_jL60J=$row['COUNT(*)'];if( $_jL60J >=2 ) { die('The Pro Edition allows unlimited uploads. <a href="javascript:window.close();">Close Window</a>');} } ?> <html><head> <title>Image Uploader</title> </head> <body> <form enctype="multipart/form-data" action="upload_img.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="<?PHP echo($_jLo0J); ?>" /> Upload File:<input name="uploadedfile" type="file" size="15" tabindex="1" /><br /> <small>Allowed Extensions:<?PHP echo( $CONF['ImageTicketEXT']);?> Max Size:<?PHP echo( round(($_jLo0J / 1024),2)."KB");?></small><br /> Short File Description (Max 200):<input name="ImageName" size="15" maxlength="200" tabindex="2" /> <input type="hidden" name="TicketID" value="<?PHP echo($TicketID); ?>" /> <input type="hidden" name="SSID" value="<?PHP echo($SSID); ?>" /><br /> <input type="submit" value="Upload File" /> &nbsp;&nbsp;&nbsp;<a href="javascript:window.close();">Close Window</a> </form> </body></html>
Return current item: WorkOrder TS