<?php 
//EG. Форма добравления/удаления изображений из галереи.
$jsVar = "{\n    uploadURL: '{$uploadURL}',\n    deleteURL: '{$deleteURL}',\n    reorderURL: '{$reorderURL}'\n}";
$jsVarName = 'eg_jsVar_' . rand(99, 9999);
$output = '
    ' . eg_loadScriptOnce('/eg_assets/js/lib/jquery-1.3.2.min.js', true) . '
    ' . eg_loadScriptOnce('/eg_assets/js/lib/aim_0.1.js', true) . '
    ' . eg_loadScriptOnce('/eg_assets/js/app/eg-image-zoo-1.1.js', true) . '
    ' . eg_loadStyleOnce('/eg_assets/css/eg-image-zoo-1.1.css', true) . '
<script>
    ' . $jsVarName . ' = ' . $jsVar . ';
</script>

<table class="eg-image-container">
    <tr>
        <td class="eg-item-image-holder">';
if (!$noImage) {
    $output .= "<img src=\"" . $imgLink . "\" alt=\"image\"/>";
} else {
    $output .= '<span style="color:red;">файл не выбран</span>';
}
$output .= '
</td>
</tr>
<tr>
        <td>
            <button type="button"
onclick="eg.image.upload(this, ' . $jsVarName . ')"
 id="eg-flash-upload">Загрузить другой</button>
        </td>
<?php

include_once 'eg_util.php';
eg_loadStyleOnce("/eg_assets/css/all.css");
eg_loadScriptOnce("/eg_assets/js/lib/jquery-1.3.2.min.js");
eg_loadScriptOnce("/eg_assets/js/lib/jquery.corner.js");
eg_loadScriptOnce("/eg_assets/js/lib/define_class.js");
eg_loadScriptOnce("/eg_assets/js/app/app.js");