Beispiel #1
0
function Trigger_ImageUpload(&$tNG)
{
    $uploadObj = new tNG_ImageUpload($tNG);
    $uploadObj->setFormFieldName("imagen");
    $uploadObj->setDbFieldName("imagen");
    $uploadObj->setFolder("../imgs/");
    $uploadObj->setMaxSize(1500);
    $uploadObj->setAllowedExtensions("gif, jpg, jpe, jpeg, png");
    $uploadObj->setRename("auto");
    return $uploadObj->Execute();
}
function Trigger_ImageUpload(&$tNG)
{
    $uploadObj = new tNG_ImageUpload($tNG);
    $uploadObj->setFormFieldName("hinhtrichdan");
    $uploadObj->setDbFieldName("hinhtrichdan");
    $uploadObj->setFolder("../images/");
    $uploadObj->setResize("true", 100, 0);
    $uploadObj->setMaxSize(3000);
    $uploadObj->setAllowedExtensions("gif, jpg, jpe, jpeg, png, bmp");
    $uploadObj->setRename("auto");
    return $uploadObj->Execute();
}