Beispiel #1
0
function Delete()
{
    global $xoopsDB;
    $ok = $_POST['ok'];
    $ido = $_POST['ido'];
    if ($ido <= 0) {
        header('location: os.php');
        die;
    }
    if ($ok) {
        $xoopsDB->query("DELETE FROM " . $xoopsDB->prefix('rmdp_softos') . " WHERE id_os='{$ido}'");
        $xoopsDB->query("DELETE FROM " . $xoopsDB->prefix('rmdp_plataformas') . " WHERE id_os='{$ido}'");
        redirect_header('os.php', 2, _AM_RMDP_DELOK);
    } else {
        xoops_cp_header();
        include 'functions.php';
        DP_ShowNav();
        echo "<table width='60%' align='center' cellspacing='1' class='outer'>\n\t\t\t\t<tr><td align='center' class='even'>\n\t\t\t\t<form name='frmDel' method='post' action='os.php'>\n\t\t\t\t<br><br>" . _AM_RMDP_CONFIRM . "<br><br>\n\t\t\t\t<input type='submit' name='sbt' value='" . _AM_RMDP_DELETE . "'>\n\t\t\t\t<input type='button' value='" . _AM_RMDP_CANCEL . "' name='cancel' onClick='history.go(-1);'>\n\t\t\t\t<input type='hidden' name='op' value='del'>\n\t\t\t\t<input type='hidden' name='ido' value='{$ido}'>\n\t\t\t\t<input type='hidden' name='ok' value='1'>\n\t\t\t\t</td></tr></table>";
        xoops_cp_footer();
    }
}
Beispiel #2
0
function Delete()
{
    global $xoopsDB;
    $ok = isset($_POST['ok']) ? $_POST['ok'] : 0;
    if ($ok) {
        $ids = $_POST['ids'];
        if ($ids <= 0) {
            header('location: modified.php');
            die;
        }
        $xoopsDB->query("DELETE FROM " . $xoopsDB->prefix('rmdp_sended') . " WHERE id_send='{$ids}'");
        redirect_header('modified.php', 1, '');
    } else {
        $ids = $_GET['ids'];
        if ($ids <= 0) {
            header('location: modified.php');
            die;
        }
        include 'functions.php';
        xoops_cp_header();
        DP_ShowNav();
        echo "<table width='60%' align='center' cellspacing='1'>\n\t\t\t\t<tr><td align='center' class='even'>\n\t\t\t\t<form name='frmDel' action='modified.php?op=del' method='post'>\n\t\t\t\t<br /><br />" . _AM_RMDP_DELCONFIRM . "<br />\n\t\t\t\t<br /><input type='submit' value='" . _AM_RMDP_DELETE . "'>\n\t\t\t\t<input type='button' name='cancel' value='" . _AM_RMDP_CANCEL . "' onClick='history.go(-1);'>\n\t\t\t\t<input type='hidden' name='ok' value='1'>\n\t\t\t\t<input type='hidden' name='ids' value='{$ids}'>\n\t\t\t\t</form></td></tr></table>";
        xoops_cp_footer();
    }
}
Beispiel #3
0
/**
 * Mostramos una lista de las descargas que
 * pertenecen a esta categoría
 */
function View()
{
    global $xoopsDB;
    $idc = $_GET['idc'];
    if ($idc <= 0) {
        header('location: categos.php');
        die;
    }
    $result = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix('rmdp_software') . " WHERE id_cat='{$idc}' ORDER BY nombre");
    xoops_cp_header();
    include 'functions.php';
    DP_ShowNav();
    $catego = DP_CategoName($idc);
    echo "<a href='downs.php?op=new'>" . _AM_RMDP_NEWDOWN . "</a><br>\n\t\t <table width='100%' class='outer' cellspacing='1'>\n\t\t\t<tr><th colspan='2'>" . sprintf(_AM_RMDP_DOWNSLIST, $catego) . "</th></tr>";
    while ($row = $xoopsDB->fetchArray($result)) {
        if ($class == 'even') {
            $class = 'odd';
        } else {
            $class = 'even';
        }
        echo "<tr class='{$class}'><td align='left'>\n\t\t\t<a href='../down.php?id={$row['id_soft']}'>{$row['nombre']}</a>\n\t\t\t</td>\n\t\t\t<td align='center' style='font-size: 10px;'>\n\t\t\t<a href='downs.php?op=os&amp;ids={$row['id_soft']}'>" . _AM_RMDP_SOFTOS . "</a> |\n\t\t\t<a href='downs.php?op=shots&amp;ids={$row['id_soft']}'>" . _AM_RMDP_SOFTSHOTS . "</a> |\n\t\t\t<a href='downs.php?op=mod&amp;ids={$row['id_soft']}'>" . _AM_RMDP_MODIFY . "</a> |\n\t\t\t<a href='downs.php?op=del&amp;ids={$row['id_soft']}'>" . _AM_RMDP_DELETE . "</a>\n\t\t\t</td></tr>";
    }
    echo "</table>";
    xoops_cp_footer();
}
Beispiel #4
0
function Delete()
{
    global $xoopsDB;
    $ok = $_POST['ok'];
    if ($ok) {
        $idp = $_POST['idp'];
        $xoopsDB->query("DELETE FROM " . $xoopsDB->prefix('rmdp_partners') . " WHERE id_par='{$idp}'");
        redirect_header('sponsor.php', 1, '');
    } else {
        include 'functions.php';
        xoops_cp_header();
        DP_ShowNav();
        echo "<table width='60%' class='outer' cellspacing='1' align='center'>\n\t\t\t\t<tr class='even' align='center'>\n\t\t\t\t<td><form name='frmDel' method='post' action='sponsor.php'>\n\t\t\t\t<br><br>" . _AM_RMDP_CONFIRM . "<br><br>\n\t\t\t\t<input type='submit' name='sbt' value='" . _AM_RMDP_DELETE . "'>\n\t\t\t\t<input type='button' name='cancel' value='" . _AM_RMDP_CANCEL . "' onClick='history.go(-1)'>\n\t\t\t\t<input type='hidden' name='op' value='del'>\n\t\t\t\t<input type='hidden' name='ok' value='1'>\n\t\t\t\t<input type='hidden' name='idp' value='" . $_GET['idp'] . "'></form>\n\t\t\t\t</td></tr></table>";
        xoops_cp_footer();
    }
}
Beispiel #5
0
//  GARANTÍA. Ver The GNU General Public License para mas detalles.          //
//  ------------------------------------------------------------------------ //
//  Questions, Bugs or any comment plese write me                            //
//  Preguntas, errores o cualquier comentario escribeme                      //
//  <*****@*****.**>                                              //
//  ------------------------------------------------------------------------ //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////
$location = 'indice';
include '../../../include/cp_header.php';
if (!file_exists("../language/" . $xoopsConfig['language'] . "/admin.php")) {
    include "../language/spanish/admin.php";
}
include 'functions.php';
xoops_cp_header();
DP_ShowNav();
/**
 * Mostramos la lista de categorias
 */
// $result = $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("rmdp_categos")." WHERE parent='0' LIMIT 0,10");
$result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("rmdp_categos"));
list($numCat) = $xoopsDB->fetchRow($result);
// Numero de categorias existentes
$result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("rmdp_software"));
list($numSoft) = $xoopsDB->fetchRow($result);
// Numero de programas existentes
$result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("rmdp_partners"));
list($numSpon) = $xoopsDB->fetchRow($result);
// Numero de patrocinadores existentes
$result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("rmdp_caracteristicas"));
list($numCars) = $xoopsDB->fetchRow($result);
Beispiel #6
0
function Delete()
{
    global $xoopsDB;
    $ok = isset($_POST['ok']) ? $_POST['ok'] : 0;
    if ($ok) {
        $ids = isset($_POST['ids']) ? $_POST['ids'] : 0;
        if ($ids <= 0) {
            header("location: sended.php");
            die;
        }
        $tbl = $xoopsDB->prefix("rmdp_sended");
        $xoopsDB->query("DELETE FROM {$tbl} WHERE id_send='{$ids}'");
        redirect_header('sended.php', 1, _AM_RMDP_DELOK);
        die;
    } else {
        include 'functions.php';
        $ids = isset($_GET['ids']) ? $_GET['ids'] : 0;
        xoops_cp_header();
        DP_ShowNav();
        echo "<table width='60%' align='center' class='outer' cellspacing='1'>\n\t\t\t\t<tr><td align='center' class='even'><form name='frmDel' action='sended.php' method='post'>\n\t\t\t\t<br />" . _AM_RMDP_DELCONFIRM . "<br /><br />\n\t\t\t\t<input type='submit' value='" . _AM_RMDP_DELETE . "' name='sbt'> \n\t\t\t\t<input type='button' value='" . _AM_RMDP_CANCEL . "' name='cancel' onclick='history.go(-1);'>\n\t\t\t\t<input type='hidden' name='op' value='del'>\n\t\t\t\t<input type='hidden' name='ok' value='1'>\n\t\t\t\t<input type='hidden' name='ids' value='{$ids}'>\n\t\t\t\t</form></td></tr></table>";
        xoops_cp_footer();
    }
}
Beispiel #7
0
function reviews()
{
    global $xoopsDB;
    $ids = isset($_GET['ids']) ? $_GET['ids'] : 0;
    if ($ids <= 0) {
        header('location: downs.php');
        die;
    }
    include 'functions.php';
    include XOOPS_ROOT_PATH . "/include/xoopscodes.php";
    xoops_cp_header();
    DP_ShowNav();
    echo "<table width='100%' cellspacing='1' class='outer'>\n\t\t\t<tr><th colspan='2'>" . _AM_RMDP_REVIEWTITLE . "</th></tr>\n\t\t\t<form name='frmRev' method='post' action='downs.php'>\n\t\t\t<tr><td class='even' align='left'>" . _AM_RMDP_SHOTDOWN . "</td>\n\t\t\t<td class='odd' align='left'><strong>" . DP_DownloadName($ids) . "</strong></td>\n\t\t\t</tr><tr align='left'><td class='even'>" . _AM_RMDP_REVIEW . "</td>\n\t\t\t<td class='odd'>\n\t\t\t";
    list($text) = $xoopsDB->fetchRow($xoopsDB->query("SELECT text FROM " . $xoopsDB->prefix('rmdp_editorcom') . " WHERE id_soft='{$ids}'"));
    $GLOBALS['text'] = $text;
    xoopsCodeTarea("text", 20, 15);
    xoopsSmilies("text");
    echo "</td></tr>\n\t\t  <tr align='left'><td class='even'>" . _AM_RMDP_RATING . "</td>\n\t\t  <td class='odd'><select name='rate'>";
    list($rate) = $xoopsDB->fetchRow($xoopsDB->query("SELECT calificacion FROM " . $xoopsDB->prefix('rmdp_software') . " WHERE id_soft='{$ids}'"));
    for ($i = 1; $i <= 5; $i++) {
        if ($i == $rate) {
            echo "<option value='{$i}' selected>{$i}</option>";
        } else {
            echo "<option value='{$i}'>{$i}</option>";
        }
    }
    echo "</td></tr>\n\t\t  <tr align='left'><td class='even'>&nbsp;</td>\n\t\t  <td class='odd'><input type='submit' name='sbt' value='" . _AM_RMDP_MODIFY . "'>\n\t\t  <input type='hidden' name='op' value='savereview'>\n\t\t  <input type='hidden' name='ids' value='{$ids}'></td></tr></form></table>";
    xoops_cp_footer();
}
Beispiel #8
0
function ModifyShot()
{
    global $xoopsDB, $ids;
    $shot = $_GET['shot'];
    if ($shot <= 0) {
        header('location: downs.php');
        die;
    }
    $result = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix('rmdp_shots') . " WHERE id_shot='{$shot}'");
    $num = $xoopsDB->getRowsNum($result);
    if ($num <= 0) {
        redirect_header('downs.php?op=shots&ids=' . $ids, 1, _AM_RMDP_SHOTNOEXIST);
        die;
    }
    $row = $xoopsDB->fetchArray($result);
    include 'functions.php';
    xoops_cp_header();
    DP_ShowNav();
    echo "<table width='60%' align='center' class='outer'>\n\t\t<tr><th colspan='2'>" . _AM_RMDP_SHOTMOD . "</th></tr>\n\t\t<form name='frmNew' method='post' action='downs.php'>\n\t\t<tr align='left'><td class='even'>" . _AM_RMDP_SHOTDOWN . "</td>\n\t\t<td class='odd'><strong>" . DP_DownloadName($row['id_soft']) . "</strong>\n\t\t<input type='hidden' name='ids' value='{$row['id_soft']}'></td></tr>\n\t\t<tr align='left'><td class='even'>" . _AM_RMDP_SHOTSMALL . "</td>\n\t\t<td class='odd'><input type='text' value='{$row['small']}' name='small' size='30' maxlength='255'></td></tr>\n\t\t<tr align='left'><td class='even'>" . _AM_RMDP_SHOTBIG . "</td>\n\t\t<td class='odd'><input type='text' value='{$row['big']}' name='big' size='30' maxlength='255'></td></tr>\n\t\t<tr align='left'><td class='even'>" . _AM_RMDP_SHOTDESC . "</td>\n\t\t<td class='odd'><input type='text' value='{$row['text']}' name='text' size='50' maxlength='255'></td></tr>\n\t\t<tr><td class='even'>&nbsp;</td>\n\t\t<td class='odd' align='left'>\n\t\t<input type='submit' name='sbt' value='" . _AM_RMDP_MODIFY . "'>\n\t\t<input type='button' name='cancel' value='" . _AM_RMDP_CANCEL . "' onClick='history.go(-1);'>\n\t\t<input type='hidden' name='action' value='savemod'>\n\t\t<input type='hidden' name='op' value='shots'>\n\t\t<input type='hidden' name='shot' value='{$shot}'>\n\t    </td></tr></form>\n\t\t</table>";
    xoops_cp_footer();
}