function _generate_users() { $cq = new user_q(); $users = $cq->get_all_users(); foreach ($users as $key => $var) { $this->robotstxt .= "Disallow: /" . $var["username"] . "/\n"; } }
acl(); quote::find_similar_quotes(); break; case "get_new_quotes_from_zitate_de": acl(); quote::get_new_quotes_from_zitate_de(); break; case "admin": acl(); echo "admin"; break; case "userprofile": $context["h1"] = ""; $context["fake_h1"] = _("User") ." ". $a_path[0]; $userinfo = user_q::user_info($a_path[0]); if ($config_q["locale"] == "et") { $content = ucwords($a_path[0]) . " on olnud tsitaat.com kasutaja alates ".$userinfo["user_regdate_parsed"].'. Ta on '. ($userinfo["quotes_added"]?'<a href="'.$user->data["username_clean"]."/".$context["labels"]["added-quotes_clean"].'">':''). 'lisanud '.$userinfo["quotes_added"].' tsitaati'. ($userinfo["quotes_added"]?'</a>':''). ', hääletanud '.$userinfo["votes"].' korda ja talle '. ($userinfo["favorite_quotes"]?'<a href="'.$user->data["username_clean"]."/".$context["labels"]["favorite-quotes_clean"].'">':''). 'meeldib '.$userinfo["favorite_quotes"].' tsitaati'. ($userinfo["favorite_quotes"]?'</a>.':''); } else if ($config_q["locale"] == "en") { $content = $a_path[0] . " has been ".str_replace("http://", "", $config_q["baseurl"])." member since ".$userinfo["user_regdate_parsed"].". He has added ".$userinfo["quotes_added"]." quotations, voted ".$userinfo["votes"]." times and has ".$userinfo["favorite_quotes"]." favourite quotes.";
public static function check() { global $user_q, $a_path, $context; if ($_GET["ajax"] == 1) { return "ajax"; } else { if ($_GET["c"] == "admin") { if ($_GET["action"] == "manage_waitinglist") { return "manage_waitinglist"; } if ($_GET["action"] == "manage_not_active_quotations") { return "manage_not_active_quotations"; } if ($_GET["action"] == "generate_indexes") { return "generate_indexes"; } if ($_GET["action"] == "find_similar_quotes") { return "find_similar_quotes"; } if ($_GET["action"] == "get_new_quotes_from_zitate_de") { return "get_new_quotes_from_zitate_de"; } return "admin"; } else { if ($a_path[0] == "") { return "frontpage"; //} else if ($a_path[0] == "cache" && $a_path[1] == "images" ) { // return "image"; } else { if ($a_path[0] == $context["labels"]["quotes_clean"]) { if ($a_path[1] == $context["labels"]["authors_clean"]) { if (strlen(utf8_decode($a_path[2])) == 1 && !isset($a_path[3])) { return "quotes-authors-%author_index%"; } if (strlen(utf8_decode($a_path[2])) > 1 && !isset($a_path[3])) { return "quotes-authors-%author%"; } if (strlen(utf8_decode($a_path[2])) > 0 && is_numeric($a_path[3]) && !isset($a_path[4])) { return "quotes-authors-%author%-%quote_id%"; } if (strlen(utf8_decode($a_path[2])) > 0 && !isset($a_path[4])) { if (preg_match("/^" . $context["labels"]["page_clean"] . "[0-9]+\$/U", $a_path[3])) { return "quotes-authors-%author%-%page%"; } } if (!isset($a_path[2])) { return "quotes-authors"; } return false; } if ($a_path[1] == $context["labels"]["tags_clean"]) { if (strlen(utf8_decode($a_path[2])) == 1 && !isset($a_path[3])) { return "quotes-tags-%tag_index%"; } if (strlen(utf8_decode($a_path[2])) > 1 && !isset($a_path[3])) { return "quotes-tags-%tag%"; } if (strlen(utf8_decode($a_path[2])) > 1 && !isset($a_path[4])) { if (preg_match("/^" . $context["labels"]["page_clean"] . "[0-9]+\$/U", $a_path[3])) { return "quotes-tags-%tag%-%page%"; } } if (!isset($a_path[2])) { return "quotes-tags"; } return false; } if ($a_path[1] == $context["labels"]["sources_clean"]) { if (strlen(utf8_decode($a_path[2])) == 1 && !isset($a_path[3])) { return "quotes-sources-%source_index%"; } if (strlen(utf8_decode($a_path[2])) > 1 && !isset($a_path[3])) { return "quotes-sources-%source%"; } if (!isset($a_path[2])) { return "quotes-sources"; } return false; } if ($a_path[1] == $context["labels"]["top-100-quotes_clean"]) { return "top-100-quotes"; } /* if ($a_path[1] == $context["labels"]["top-100-200-quotes_clean"]) { return "top-100-200-quotes"; }*/ } else { if ($a_path[0] == $context["labels"]["search_clean"]) { return "search"; } else { if ($a_path[0] == $context["labels"]["statistics_clean"]) { return "statistics"; } else { if ($a_path[0] == $context["labels"]["fans_clean"]) { return "fans"; } else { if (is_numeric($a_path[0])) { return "shortcut"; } else { if ($a_path[0] == $context["labels"]["latest-quotes_clean"]) { if (!isset($a_path[1])) { return "latest-quotes"; } if (isset($a_path[1])) { if (preg_match("/^" . $context["labels"]["page_clean"] . "[0-9]+/U", $a_path[1])) { return "latest-quotes-%page%"; } return false; } return false; } else { if ($a_path[0] == $context["labels"]["contributors_clean"] && !isset($a_path[1])) { return "contributors"; } else { if ($a_path[0] == "rpx_auth" && !isset($a_path[1])) { return "rpx_auth"; } else { if (user_q::user_exists($a_path[0])) { if (isset($a_path[1])) { if ($a_path[1] == $context["labels"]["favorite-quotes_clean"]) { return "userprofile-favorite-quotes"; } elseif ($a_path[1] == $context["labels"]["added-quotes_clean"]) { return "userprofile-added-quotes"; } } else { return "userprofile"; } } } } } } } } } } } } } }