Beispiel #1
0
        $li .= '[\'' . $v1[0] . '\',\'' . $v1[1] . '\',\'' . $v1[2] . '\'],' . "\n";
    }
    $li = substr_replace($li, '', -2, 1);
    $content .= $li;
    $content .= "];\n";
    $content .= "?>";
    fwrite($file, $content);
    fclose($file);
    @chmod("modules/{$ModPath}/reseaux-sociaux.conf.php", 0666);
}
switch ($subop) {
    case "SaveSetReseaux":
        SaveSetReseaux($ModPath, $ModStart, $rs_id, $rs_url, $rs_ico, $subop);
        ListReseaux($ModPath, $ModStart, $f_meta_nom, $f_titre, $adminimg);
        break;
    case "DeleteReseaux":
        SaveSetReseaux($ModPath, $ModStart, $rs_id, $rs_url, $rs_ico, $subop);
        ListReseaux($ModPath, $ModStart, $f_meta_nom, $f_titre, $adminimg);
        break;
    case "AddReseaux":
        EditReseaux($ModPath, $ModStart, $f_meta_nom, $f_titre, $adminimg, $rs_id, $rs_url, $rs_ico, $subop);
        //      ListReseaux($ModPath, $ModStart,$f_meta_nom, $f_titre, $adminimg);
        break;
    case "EditReseaux":
        EditReseaux($ModPath, $ModStart, $f_meta_nom, $f_titre, $adminimg, $rs_id, $rs_url, $rs_ico, $subop);
        break;
        ListReseaux($ModPath, $ModStart, $f_meta_nom, $f_titre, $adminimg);
    default:
        ListReseaux($ModPath, $ModStart, $f_meta_nom, $f_titre, $adminimg);
        break;
}
Beispiel #2
0
            <input type="hidden" name="op" value="SaveSetReseaux" />
         </div>
      </div>
   </form>';
    adminfoot('', '', '', '');
}
function SaveSetReseaux($ModPath, $ModStart)
{
    global $cookie;
    $li_rs = '';
    foreach ($_POST['rs'] as $v1) {
        if ($v1['uid'] !== '') {
            $li_rs .= $v1['id'] . '|' . $v1['uid'] . ';';
        }
    }
    $li_rs = rtrim($li_rs, ';');
    $li_rs = removeHack(stripslashes(FixQuotes($li_rs)));
    sql_query("UPDATE " . $NPDS_Prefix . "users_extend SET M2='{$li_rs}' WHERE uid='{$cookie['0']}'");
    Header("Location: modules.php?&ModPath={$ModPath}&ModStart={$ModStart}");
}
switch ($op) {
    case 'SaveSetReseaux':
        SaveSetReseaux($ModPath, $ModStart);
        break;
    case 'EditReseaux':
        EditReseaux($ModPath, $ModStart);
        break;
    default:
        ListReseaux($ModPath, $ModStart);
        break;
}