/branches/ant/0.9.x/lib/core.php |
---|
420,8 → 420,12 |
* @param integer $distID |
* @return string |
*/ |
public function showDistributionForm($distID = 0) { |
public function showDistributionForm($distID = 0, $info = '') { |
$sDistID = $this->secure->checkInt($distID); |
$sInfo = $this->secure->checkStr($info, 1); |
if ($sInfo == "") { |
$sInfo = "Дистрибутив"; |
} |
if ($sDistID != 0) { |
// Режим редактирования |
$query = "SELECT * FROM ".$this->prefix."distribution WHERE dist_id='".$sDistID."'"; |
435,7 → 439,7 |
$image = "<img src='./img/d/empty-logo.png' width='32' height='32' id='adm-dist-logo' alt='Логотип дистрибутива' title='Логотип дистрибутива не загружен'>"; |
} |
$show = "<fieldset><legend>Дистрибутив</legend>\n"; |
$show = "<fieldset><legend>".$sInfo."</legend>\n"; |
$show .= "<div class='inputbox'><label for='dname'>Название дистрибутива:</label> <input type='text' name='dname' id='dname' value='".$this->secure->checkStr($element["distname"],1)."'></div>\n"; |
$show .= "<div class='inputbox'><label for='dua'>UA дистрибутива:</label> <input type='text' name='dua' id='dua' value='".$this->secure->checkStr($element["distua"],1)."'></div>\n"; |
$show .= "<div class='inputbox'><label for='dtype'>Тип дистрибутива:</label> ".$this->showDistTypeForm("dtype",$element["dtype_id"])."</div>\n"; |
558,8 → 562,12 |
* @param integer $versionID |
* @return string |
*/ |
public function showDistVersionsForm($versionID = 0) { |
public function showDistVersionsForm($versionID = 0, $info = '') { |
$sVersionID = $this->secure->checkInt($versionID); |
$sInfo = $this->secure->checkStr($info, 1); |
if ($sInfo == "") { |
$sInfo = "Версия дистрибутива"; |
} |
if ($sVersionID != 0) { |
// Режим редактирования |
$query = "SELECT * FROM ".$this->prefix."version v JOIN ".$this->prefix."distribution d ON v.dist_id=d.dist_id WHERE v.version_id='".$versionID."'"; |
567,7 → 575,7 |
$rq->fetchInto($element); |
} |
$show = "<fieldset><legend>Версия дистрибутива</legend>\n"; |
$show = "<fieldset><legend>".$sInfo."</legend>\n"; |
if ($sVersionID != 0) { |
$show .= "<div class='inputbox'><label for='distname'>Дистрибутив:</label> <input type='text' name='distname' value='".$this->secure->checkStr($element["distname"],1)."' readonly='readonly'></div>\n"; |
} else { |
/branches/ant/0.9.x/manager.php |
---|
73,7 → 73,7 |
case 'new': |
$body .= "<form action='".$process."' method='post'>\n"; |
$body .= "<input type='hidden' name='mode' value='distributive-add'>\n"; |
$body .= $core->showDistributionForm(); |
$body .= $core->showDistributionForm(0,"Добавление информации о новом дистрибутиве"); |
$body .= "</form>"; |
break; |
case 'edit': |
80,7 → 80,7 |
$body .= "<form action='".$process."' method='post'>\n"; |
$body .= "<input type='hidden' name='mode' value='distributive-edit'>\n"; |
$body .= "<input type='hidden' name='distID' value='".$uuid."'>\n"; |
$body .= $core->showDistributionForm($uuid); |
$body .= $core->showDistributionForm($uuid, "Редактирование информации о дистрибутиве"); |
$body .= "</form>"; |
break; |
case 'delete': |
87,7 → 87,7 |
$body .= "<form action='".$process."' method='post'>\n"; |
$body .= "<input type='hidden' name='mode' value='distributive-delete'>\n"; |
$body .= "<input type='hidden' name='distID' value='".$uuid."'>\n"; |
$body .= $core->showDistributionForm($uuid); |
$body .= $core->showDistributionForm($uuid, "Удаление информации о дистрибутиве"); |
$body .= "</form>"; |
break; |
} |
108,7 → 108,7 |
$body .= "<form action='".$process."' method='post'>\n"; |
$body .= "<input type='hidden' name='mode' value='version-edit'>\n"; |
$body .= "<input type='hidden' name='versionID' value='".$uuid."'>\n"; |
$body .= $core->showDistVersionsForm($uuid); |
$body .= $core->showDistVersionsForm($uuid, "Редактирование информации о версии дистрибутива"); |
$body .= "</form>"; |
break; |
case 'delete': |
115,13 → 115,13 |
$body .= "<form action='".$process."' method='post'>\n"; |
$body .= "<input type='hidden' name='mode' value='version-delete'>\n"; |
$body .= "<input type='hidden' name='versionID' value='".$uuid."'>\n"; |
$body .= $core->showDistVersionsForm($uuid); |
$body .= $core->showDistVersionsForm($uuid, "Удаление информации о версии дистрибутива"); |
$body .= "</form>"; |
break; |
case 'new': |
$body .= "<form action='".$process."' method='post'>\n"; |
$body .= "<input type='hidden' name='mode' value='version-add'>\n"; |
$body .= $core->showDistVersionsForm(); |
$body .= $core->showDistVersionsForm(0, "Добавление новой версии дистрибутива"); |
$body .= "</form>"; |
break; |
} |