Esempio n. 1
0
			$upload=new Upload($vars->url_upload(),$_FILES['pc_upload']);
			$upload->uploaddir('upload');
			$e->file($upload->upload());

			$e->mysqlInsert();
			echo "<h4>{$vars->catname()} hinzugef&uuml;gt</h4>";
		}else {
			//nicht alle erforderlichen Variablen dabei
			echo "<h5>missing stuff:</h5>";
			foreach ($vars->missingVars()as $missing){
				echo $missing. ", ";
			}
		}
		/**Formular erzeugen***/
		$path=pathinfo(__FILE__);
		$form=new Formgen("post", $path['filename'].'.'.$path['extension']);
		$form->addTextField("Name", "catname");
		$form->addSelect("kategorie", "category",$category->mysqlSelect());
		$form->addSelect("platform", "platform",$platform->mysqlSelect());
		$form->addSelect("Spache", "language", $languages);
		$form->addTextArea("beschreibung", "content","Beschreibung eingeben", 30,65);
		$form->addTextField("upload from url", "url_upload");
		$form->addUpload("upload from pc", "pc_upload");
		$form->addCheckBox("verified", "verified");
		echo $form->getForm();
		?>

	</div>
</body>
</html>
Esempio n. 2
0
			$e=new pExploit();
			$e->dbh($dbh);
			$e->mysqlSelect($edit->edit());					
			
			$categories = array($e->category() =>$e->loadCategory()) + $category->mysqlSelect();
			$platforms=array($e->platform() =>$e->loadPlatform()) + $platform->mysqlSelect();
			$languages=array_merge(array($e->codeLanguage()), $languages);
			$path=pathinfo(__FILE__);
			
		
			$form=new Formgen("post", $path['filename'].'.'.$path['extension']);
			$form->addTextField("Name", "catname", $e->title());
			$form->addSelect("kategorie", "category",$categories);
			$form->addSelect("platform", "platform",$platforms);
			$form->addSelect("Spache", "language", $languages);
			$form->addTextArea("beschreibung", "content",$e->content(), 30,65);
			$form->addTextField("upload from url", "url_upload");
			$form->addUpload("upload from pc", "pc_upload");
			$check=$e->verified()?true:false;
			
			$form->addCheckBox("verified", "verified",$e->verified());
			$form->addHidden("id", $e->id());
			$form->addHidden("edit", $e->id());
			echo $form->getForm();
		}
		?>

	</div>
</body>
</html>