コード例 #1
0
         reset($Show);
         unset($Show['ID']);
         unset($Show['Nickname']);
         while ($key = key($Show)) {
             // Anzeigestatus auf 0
             if (isset($_POST['Show'][$key]) && $_POST['Show'][$key] != 0) {
                 $Show[$key] = 1;
             } else {
                 $Show[$key] = 0;
             }
             next($Show);
         }
     }
     $Show['Nickname'] = 1;
     // Nickname muss angezeigt werden
     $Update = aArrayIntoString($Show);
     // Array zu String
     DBU(DBTabProfiles, "ID='" . $_SESSION['ID'] . "'", $Update);
     // Anzeigestatus speichern
     if ($_FILES['Profilbild']['size'] > 0) {
         // Profilbild speichern
         CreateThumbnail(120, $_FILES['Profilbild'], AvatarVerzeichnis . "/" . $_SESSION['Nickname'] . ".jpg");
     }
 }
 // Anzeigen des eigenen Profils im Editiermodus ...
 $Array = DBQ("SELECT * FROM " . DBTabUsers . " WHERE ID='" . $_SESSION['ID'] . "'");
 $Array = $Array[0];
 $Show = DBQ("SELECT * FROM " . DBTabProfiles . " WHERE ID='" . $_SESSION['ID'] . "'");
 if (is_array($Show)) {
     $Show = $Show[0];
 }
コード例 #2
0
function DBIChain($Table, $Vars, $Array)
{
    $q = "INSERT INTO {$Table}({$Vars}) VALUES";
    $Values = array();
    foreach ($Array as $Insert) {
        $Values[count($Values)] = "(" . aArrayIntoString($Insert) . ")";
    }
    $q .= join($Values, ", ");
    print_r($q);
    die;
    return DBQ($q);
}