value, true); } $value_new[0]['1'] = $voc[0]['1']; $value_new[0]['2'] = $voc[0]['2']; $value_new[0]['progress'] = '0'; $value_new_new = json_encode($value_new); $id = ''; $string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJLKMNOPQRSTUVW0123456789"; for ($i = 1; $i <= 8; $i++) { $zufallszahl = rand(0, 62); $zufallszahl = substr($string, $zufallszahl, 1); $id = $id . $zufallszahl; } // Teten ob ID bereits IN DIESEM ORDNER vorhanden $sql = "SELECT `id` FROM `VokabelBox2Content` WHERE `id` = '$id' AND `type` = 'voc' AND `path` = '$userid/lang/$meta/'"; $result_articles = mysql_query ($sql, $ezine_db); if(mysql_num_rows($result_articles)) { die(); } // Anzahl im Nutzerkonto gespeicherter Vokabeln wird geholt $sql = "SELECT `id` FROM `VokabelBox2Content` WHERE `path` LIKE '$userid/%' AND `type` = 'voc'"; $result_articles = mysql_query ($sql, $ezine_db); $statVOC = mysql_num_rows($result_articles); if($statVOC > '1000') { die(); } mysql_query("INSERT INTO `VokabelBox2Content`(`id`, `path`, `value`, `type`) VALUES ('$id','$userid/lang/$meta/','$value_new_new','voc')"); } else { die(); } } } $list_new_id = $meta; $sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `id` = '$list'"; $result_articles = mysql_query ($sql, $ezine_db); while ($articleDb = mysql_fetch_object($result_articles)) { $list = $articleDb->value; } $sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `id` = '$meta'"; $result_articles = mysql_query ($sql, $ezine_db); while ($articleDb = mysql_fetch_object($result_articles)) { $list_new = $articleDb->value; } echo count($selected_items) - 1 . "," . $list . "," . $list_new . "," . $list_new_id . ",true"; ?>