'; } else{ global $link; $ctgry=$_POST['nuCategory']; $result = mysql_query("insert into uploadcategories(categoryDef,dateOfEntry) values('$ctgry',curdate())",$link); if(!$result){ $ErrMsg='Error adding new category. '.mysql_error().'
'; } else{ $message.= 'New category added successfully
'; } } } if(@$_POST['action']&&@$_POST['action']=='uploadFile'){ $message = ''; if(!$_FILES['fupload']['size']>0){ $message .= '
No file selected for uploading!
'; } if($_FILES['fupload']['size']>9000000){ $message .= 'File size is too large. Limit is at 9Mb
'; } if(!$_POST['caption']){ $message .= '
Fill in a caption for the file!
'; } /* */ global $upfile; $upfile = $_SERVER['DOCUMENT_ROOT'].'/publications/'.$_FILES['fupload']['name']; if(!copy($_FILES['fupload']['tmp_name'],"$upfile")){ $message .= '
Error copying file to upload directory
'; } else{ $message .= 'File uploaded successfully.
'; $caption = $_POST['caption']; $catgry = $_POST['category']; $Author= $_POST['author']; $releaseDate= $_POST['rlseDate']; $tTle = $_POST['ttle']; $upfileModified = 'http://www.csti.or.ke/publications/'.$_FILES['fupload']['name']; $sql = "insert into uploads(caption,pathToFile,category,author,title,releaseDate,dateOfEntry) values('$caption','$upfileModified','$catgry','$Author','$tTle','$releaseDate',curdate())"; $result = mysql_query($sql,$link); if(!$result) $message.= 'Error entering data to uploads table. '.mysql_error(); } } ?> :::Centre for Science and Technology Innovations:::

ABOUT US


CSTI REPORTS & PUBLICATIONS ON VARIOUS TOPICS WITHIN OUR SCOPE OF OPERATION

'.$message.''; } if(isset($_POST['action'])&&$_POST['action']=='searchThis') { if(empty($_POST['searchItem'])) { print "You must fill in something to do a search.
"; } else fullPubicationsSearch($_POST['searchItem']); } ?>
Search Author or Title
Upload File










'; else print ''; ?>
Add New Category