Esempio n. 1
0
/**
 * Eliminamos una im?gen
 */
function rmmfDelImg()
{
    global $db, $mc;
    $id = isset($_GET['id']) ? $_GET['id'] : 0;
    if ($id <= 0) {
        header('location: index.php');
        die;
    }
    $img = isset($_GET['img']) ? $_GET['img'] : 0;
    if ($img <= 0) {
        header("location: index.php?op=imgs&amp;id={$id}");
        die;
    }
    $result = $db->query("SELECT * FROM " . $db->prefix("rmmf_images") . " WHERE id_img='{$img}' AND work='{$id}'");
    if ($db->getRowsNum($result) <= 0) {
        redirect_header("index.php?op=imgs&amp;id={$id}", 1, _MA_RMMF_ERRNOIMG);
        die;
    }
    $row = $db->fetchArray($result);
    $dir = rmmf_add_slash($mc['storedir']);
    if (file_exists($dir . $row['archivo'])) {
        unlink($dir . $row['archivo']);
        unlink($dir . 'ths/' . $row['archivo']);
    }
    $db->queryF("DELETE FROM " . $db->prefix("rmmf_images") . " WHERE id_img='{$img}' AND work='{$id}'");
    if ($db->error() != '') {
        redirect_header('index.php?op=imgs&amp;id=' . $id, 2, sprintf(_MA_RMMF_ERRDB, $db->error()));
        die;
    } else {
        redirect_header('index.php?op=imgs&amp;id=' . $id, 2, '');
        die;
    }
}
Esempio n. 2
0
* @autor: BitC3R0                                                  *
* @paquete: RMSOFT GS 2.0                                          *
* @version: 1.0.4                                                  *
* @modificado: 24/05/2006 12:52:24 a.m.                            *
*******************************************************************/
include 'header.php';
$id = isset($_GET['id']) ? $_GET['id'] : 0;
if ($id <= 0) {
    header('location: index.php');
    die;
}
$xoopsOption['template_main'] = 'rmmf_view.html';
$tpl->assign('localize_bar', ":: <a href='index.php'>{$mc['title']}</a>" . rmmf_localize($id, 1));
include_once 'class/work.class.php';
$work = new MFWork($id);
$tpl->assign('work', array('id' => $work->getVar('id_w'), 'titulo' => $work->getVar('titulo'), 'desc' => $myts->makeTareaData4Show($work->getVar('desc')), 'cliente' => $work->getVar('cliente'), 'comentario' => $myts->makeTareaData4Show($work->getVar('comentario')), 'url' => $work->getVar('url'), 'imagen' => $work->getVar('imagen')));
$tpl->assign('lang_for', _RMMF_FOR);
$tpl->assign('lang_desc', _RMMF_DESC);
$tpl->assign('lang_url', _RMMF_URL);
$tpl->assign('lang_comment', sprintf(_RMMF_COMMENT, $work->getVar('cliente')));
$tpl->assign('lang_moreimgs', _RMMF_MOREIMAGES);
foreach ($work->getVar('images') as $k => $v) {
    $tpl->append('images', $v['archivo']);
}
$xmh = "<script type=\"text/javascript\">\n<!--\n\tfunction cambiar(img){\n\t\tdocument.getElementById(\"pics\").src = '" . rmmf_add_slash(rmmf_web_dir($mc[storedir])) . "' + img\n\t}\n\t\n//-->\n</script>";
$xoops_module_header .= $xmh;
$xoops_module_header .= '<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />';
include 'footer.php';
Esempio n. 3
0
/**
 * Obtenemos el directorio web
 */
function rmmf_web_dir($dir)
{
    $dir = rmmf_add_slash($dir);
    $dir = str_replace(XOOPS_ROOT_PATH, XOOPS_URL, $dir);
    return $dir;
}
Esempio n. 4
0
*                                                                  *
* You should have received a copy of the GNU General Public        *
* License along with this program; if not, write to the Free       *
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,   *
* MA 02111-1307 USA                                                *
*                                                                  *
* ------------------------------------------------------           *
* header.php:                                                      *
* Archivo cargador de clases                                       *
* ------------------------------------------------------           *
* @copyright: © 2006. BitC3R0.                                     *
* @autor: BitC3R0                                                  *
* @paquete: RMSOFT GS 2.0                                          *
* @version: 1.0.2                                                  *
* @modificado: 24/05/2006 12:51:35 a.m.                            *
*******************************************************************/
include "../../mainfile.php";
include XOOPS_ROOT_PATH . "/header.php";
$myts =& MyTextSanitizer::getInstance();
if (!file_exists(XOOPS_ROOT_PATH . "/modules/rmmf/language/" . $xoopsConfig['language'] . "/main.php")) {
    include "language/spanish/main.php";
    $xoopsTpl->assign('mod_language', 'spanish');
}
include 'admin/admin.func.php';
$mc =& $xoopsModuleConfig;
$myts = MyTextSanitizer::getInstance();
$db =& $xoopsDB;
$tpl =& $xoopsTpl;
$tpl->assign('storedir', rmmf_add_slash(rmmf_web_dir($mc['storedir'])));
$tpl->assign('module_path', XOOPS_ROOT_PATH . '/modules/rmshop');
$tpl->assign('module_title', $mc['title']);