- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
function showFormEdit($id="",$sMsg="", $p_iPageIndex="")
{
global $oGlobal;
eval( $oGlobal->getGlobalVars() );
$oGlobal->importUserClass( "rubik.CMoneyOXConfig");
RImporter::importRubikClass("ext.xpbox.RHtmlImageUploadForm");
RImporter::importRubikClass("ext.xpbox.RHtmlUploadForm");
RImporter::importRubikClass("ext.xpbox.RDbComboboxHtml");
$oGlobal->importUserClass("rubik.CRubikHelper");
$oModel = $this->m_oModel;
$dirHelper= CMoneyOXConfig::getInstance();
$sBlast = "Manage Download";
$assetPath = ASSET_PATH;
$helper = new CRubikHelper();
$x_title = htmlentities( @$_POST['x_title'], ENT_QUOTES );
$x_type = @$_POST['x_type'];
$x_status = @$_POST['x_status'];
$x_date = @$_POST['x_date'];
if(!empty($id))
{
$result = $oModel->getDownloadbyID($id);
$record = $result->recordSet;
$row = $record[0];
$sBlast = "Edit Download";
$title = $row['title'];
$date= date("Y-m-d ",strtotime($row['date']));
if($row['publish']) $sYes= " checked=\"true\"";
else $sNo= " checked=\"true\"";
//create upload image form
$picUpload = new RHtmlImageUploadForm("x_picture",$dirHelper->downloadImageDir,$row['preview_image']);
$htmlPicture = $picUpload->createUploadFormHtml(50);
//create upload file form
$fileUpload = new RHtmlUploadForm("x_file",$dirHelper->downloadFileDir,$row['download_image'],".zip,.rar");
$htmlFile = $fileUpload->createUploadFormHtml(50);
//create combobox type
$sql = "select id,name from download_setting order by id";
$categoryTypeHtml = new RDbComboboxHtml($sql,"id", "name", "type",$row['type']);
$cbxType = $categoryTypeHtml->createCombobox();
$thumb = $helper->getThumbName($row['preview_image'],$dirHelper->downloadThumbDir);
$thumb = ABS_PATH.$thumb;
$thumb = str_replace("administrator/","",$thumb);
$thumbHtml = "<img src=\"{$thumb}\" alt=\"\" class=\"borderimg1\"/><br />
<input type=\"checkbox\" name=\"remove\" id=\"x_remove\" value=\"remove\" border=\"0\" />
Remove Photo";
}
@eval( "\$tpl= \"".getTemplate( "edit.back", COMP_PATH . "templates/back" )."\";" );
$sys_sCompContent .= $tpl;
return $tpl;
}
guest 01.05.2009 14:19 # 0
guest 01.05.2009 16:08 # +1
guest 02.05.2009 02:37 # 0
RubikClass o_O