public static function get_from_waitinglist() { global $user, $config_q, $table_prefix; $q = "\n\t\t\tSELECT\n\t\t\t\t" . $config_q["db"]["prefix"] . "quotes_waiting_approval.id AS waiting_quote_id,\n\t\t\t\t" . $config_q["db"]["prefix"] . "quotes_waiting_approval.author_id AS author_id,\n\n\t\t\t\t" . $config_q["db"]["prefix"] . "quote_authors.author_name_freeform_et AS author_name_freeform_et,\n\t\t\t\t" . $config_q["db"]["prefix"] . "quote_authors.author_lastname_et AS author_lastname_et,\n\t\t\t\t" . $config_q["db"]["prefix"] . "quote_authors.author_midname_et AS author_midname_et,\n\t\t\t\t" . $config_q["db"]["prefix"] . "quote_authors.author_firstname_et AS author_firstname_et,\n\t\t\t\t" . $config_q["db"]["prefix"] . "quote_authors.url_friendly_author_name_" . $config_q["locale"] . ",\n\n\t\t\t\t" . $config_q["db"]["prefix"] . "quotes_waiting_approval.author_name AS waiting_author_name,\n\t\t\t\t" . $config_q["db"]["prefix"] . "quotes_waiting_approval.author_profession_et AS waiting_author_profession_et,\n\n\t\t\t\t" . $config_q["db"]["prefix"] . "quotes_waiting_approval.author_born AS waiting_author_born,\n\t\t\t\t" . $config_q["db"]["prefix"] . "quotes_waiting_approval.author_death AS waiting_author_death,\n\t\t\t\t" . $config_q["db"]["prefix"] . "quotes_waiting_approval.quote AS quote,\n\t\t\t\t" . $config_q["db"]["prefix"] . "categories.name_" . $config_q["locale"] . " as category,\n\t\t\t\t" . $config_q["db"]["prefix"] . "quotes_waiting_approval.tag AS tag,\n\t\t\t\t" . $config_q["db"]["prefix"] . "quotes_waiting_approval.source_title AS waiting_source_title,\n\t\t\t\t" . $config_q["db"]["prefix"] . "quotes_waiting_approval.source_year_start AS waiting_source_year_start,\n\t\t\t\t" . $config_q["db"]["prefix"] . "quotes_waiting_approval.created_by AS waiting_created_by,\n\t\t\t\t" . $config_q["db"]["prefix"] . "quotes_waiting_approval.date_inserted AS waiting_date_inserted,\n\t\t\t\t" . USERS_TABLE . ".username AS username\n\t\t\tFROM\n\t\t\t(\n\t\t\t\t" . $config_q["db"]["prefix"] . "quotes_waiting_approval,\n\t\t\t\t" . USERS_TABLE . ",\n\t\t\t\t" . $config_q["db"]["prefix"] . "categories\n\t\t\t)\n\t\t\tLEFT JOIN\n\t\t\t\t" . $config_q["db"]["prefix"] . "quote_authors\n\t\t\tON\n\t\t\t\t" . $config_q["db"]["prefix"] . "quotes_waiting_approval.author_id = " . $config_q["db"]["prefix"] . "_quote_authors.id\n\t\t\tWHERE\n\t\t\t\t" . USERS_TABLE . ".user_id = " . $config_q["db"]["prefix"] . "quotes_waiting_approval.created_by\n\t\t\t\tAND\n\t\t\t\t" . $config_q["db"]["prefix"] . "quotes_waiting_approval.author_id != 0\n\t\t\t\tAND\n\t\t\t\tstatus = 0\n\t\t\t\tAND\n\t\t\t\t" . $config_q["db"]["prefix"] . "categories.id = " . $config_q["db"]["prefix"] . "quotes_waiting_approval.category\n\t\t\tORDER BY \n\t\t\t\tdate_inserted\n\t\t\tASC\n\t\t;"; $r = q($q); $a_out = array(); while ($row = mysqli_fetch_array($r, MYSQL_ASSOC)) { $row = quote::parse_tags($row); $row = author::parse_author_name($row); $row = author::parse_author_born_death($row); $row = author::parse_author_profession($row); $row = author::parse_url_friendly_author_name($row); $a_out[] = $row; } //$a_out = $this->get_author_img_data2($a_out); $a_out = quote::parse_author_photos($a_out); return $a_out; }