query($sql); $object_array = array(); while ($row = $database->fetch_array($result_set)) { $object_array[] = self::instantiate($row); } //var_dump($object_array); return $object_array; } private static function instantiate($record){ // Could check that $record exists and is an array $object = new self; // Simple, long-form approach: // $object->id = $record['id']; // $object->username = $record['username']; // $object->password = $record['password']; // $object->first_name = $record['first_name']; // $object->last_name = $record['last_name']; // More dynamic, short-form approach: foreach($record as $attribute=>$value){ if($object->has_attribute($attribute)) { $object->$attribute = $value; } } return $object; } private function has_attribute($attribute) { // We don't care about the value, we just want to know if the key exists // Will return true or false return array_key_exists($attribute, $this->attributes()); } protected function attributes() { // return an array of attribute names and their values $attributes = array(); foreach(self::$db_fields as $field) { if(property_exists($this, $field)) { $attributes[$field] = $this->$field; } } return $attributes; } protected function sanitized_attributes() { global $database; $clean_attributes = array(); // sanitize the values before submitting // Note: does not alter the actual value of each attribute foreach($this->attributes() as $key => $value){ $clean_attributes[$key] = $database->escape_value($value); } return $clean_attributes; } public function save() { // A new record won't have an id yet. return isset($this->id) ? $this->update() : $this->create(); } public function create() { global $database; // Don't forget your SQL syntax and good habits: // - INSERT INTO table (key, key) VALUES ('value', 'value') // - single-quotes around all values // - escape all values to prevent SQL injection $attributes = $this->sanitized_attributes(); $sql = "INSERT INTO ".self::$table_name." ("; $sql .= join(", ", array_keys($attributes)); $sql .= ") VALUES ('"; $sql .= join("', '", array_values($attributes)); $sql .= "')"; if($database->query($sql)) { $this->id = $database->insert_id(); return true; } else { return false; } } public function update_transaction($sql=""){ global $database; $database->query($sql); return ($database->affected_rows() == 1) ? true : false; } public function update() { global $database; // Don't forget your SQL syntax and good habits: // - UPDATE table SET key='value', key='value' WHERE condition // - single-quotes around all values // - escape all values to prevent SQL injection $attributes = $this->sanitized_attributes(); $attribute_pairs = array(); foreach($attributes as $key => $value) { $attribute_pairs[] = "{$key}='{$value}'"; } $sql = "UPDATE ".self::$table_name." SET "; $sql .= join(", ", $attribute_pairs); $sql .= " WHERE id=". $database->escape_value($this->id); $database->query($sql); return ($database->affected_rows() == 1) ? true : false; } public function delete() { global $database; // Don't forget your SQL syntax and good habits: // - DELETE FROM table WHERE condition LIMIT 1 // - escape all values to prevent SQL injection // - use LIMIT 1 $sql = "DELETE FROM ".self::$table_name; $sql .= " WHERE id=". $database->escape_value($this->id); $sql .= " LIMIT 1"; $database->query($sql); return ($database->affected_rows() == 1) ? true : false; // NB: After deleting, the instance of User still // exists, even though the database entry does not. // This can be useful, as in: // echo $user->first_name . " was deleted"; // but, for example, we can't call $user->update() // after calling $user->delete(). } } ?>query($sql); $object_array = array(); while ($row = $database->fetch_array($result_set)) { $object_array[] = self::instantiate($row); } //var_dump($object_array); return $object_array; } private static function instantiate($record){ // Could check that $record exists and is an array $object = new self; // Simple, long-form approach: // $object->id = $record['id']; // $object->username = $record['username']; // $object->password = $record['password']; // $object->first_name = $record['first_name']; // $object->last_name = $record['last_name']; // More dynamic, short-form approach: foreach($record as $attribute=>$value){ if($object->has_attribute($attribute)) { $object->$attribute = $value; } } return $object; } private function has_attribute($attribute) { // We don't care about the value, we just want to know if the key exists // Will return true or false return array_key_exists($attribute, $this->attributes()); } protected function attributes() { // return an array of attribute names and their values $attributes = array(); foreach(self::$db_fields as $field) { if(property_exists($this, $field)) { $attributes[$field] = $this->$field; } } return $attributes; } protected function sanitized_attributes() { global $database; $clean_attributes = array(); // sanitize the values before submitting // Note: does not alter the actual value of each attribute foreach($this->attributes() as $key => $value){ $clean_attributes[$key] = $database->escape_value($value); } return $clean_attributes; } public function save() { // A new record won't have an id yet. return isset($this->id) ? $this->update() : $this->create(); } public function create() { global $database; // Don't forget your SQL syntax and good habits: // - INSERT INTO table (key, key) VALUES ('value', 'value') // - single-quotes around all values // - escape all values to prevent SQL injection $attributes = $this->sanitized_attributes(); $sql = "INSERT INTO ".self::$table_name." ("; $sql .= join(", ", array_keys($attributes)); $sql .= ") VALUES ('"; $sql .= join("', '", array_values($attributes)); $sql .= "')"; if($database->query($sql)) { $this->id = $database->insert_id(); return true; } else { return false; } } public function update_transaction($sql=""){ global $database; $database->query($sql); return ($database->affected_rows() == 1) ? true : false; } public function update() { global $database; // Don't forget your SQL syntax and good habits: // - UPDATE table SET key='value', key='value' WHERE condition // - single-quotes around all values // - escape all values to prevent SQL injection $attributes = $this->sanitized_attributes(); $attribute_pairs = array(); foreach($attributes as $key => $value) { $attribute_pairs[] = "{$key}='{$value}'"; } $sql = "UPDATE ".self::$table_name." SET "; $sql .= join(", ", $attribute_pairs); $sql .= " WHERE id=". $database->escape_value($this->id); $database->query($sql); return ($database->affected_rows() == 1) ? true : false; } public function delete() { global $database; // Don't forget your SQL syntax and good habits: // - DELETE FROM table WHERE condition LIMIT 1 // - escape all values to prevent SQL injection // - use LIMIT 1 $sql = "DELETE FROM ".self::$table_name; $sql .= " WHERE id=". $database->escape_value($this->id); $sql .= " LIMIT 1"; $database->query($sql); return ($database->affected_rows() == 1) ? true : false; // NB: After deleting, the instance of User still // exists, even though the database entry does not. // This can be useful, as in: // echo $user->first_name . " was deleted"; // but, for example, we can't call $user->update() // after calling $user->delete(). } } ?>query($sql); $row = $database->fetch_array($result_set); return array_shift($row); } public static function find_by_subject_limit($s_id, $limit = 36) { $total = self::count_by_subject($s_id); $offset = 0; if($total > 36){ $offset = $total - 36; } return self::find_by_sql("SELECT * FROM ".self::$table_name." WHERE subject_id = {$s_id} ORDER BY id DESC LIMIT {$limit} OFFSET {$offset}"); } public static function count_user_tests($user_id){ global $database; $sql="SELECT COUNT(*) FROM ".self::$table_name." WHERE user_id={$user_id}"; $result_set=$database->query($sql); $row=$database->fetch_array($result_set); return array_shift($row); } public static function update_exam($sql=""){ global $database; $result_set = $database->query($sql); if($result_set){ return true; }else{ return false; } } public static function execute_query($id=0,$subject_id=0,$user=0,$text='',$date_pass='',$date_begining=''){ global $database; $date=mysql_real_escape_string($date_begining); $text=mysql_real_escape_string($text); $sql="INSERT INTO ".self::$table_name." (question_id,subject_id,user_id,date_pass,text,date_begining) VALUES ('$id','$subject_id','$user','$date_pass','$text','$date_begining')"; $result_set = $database->query($sql); if($result_set){ return true; }else{ return false; } } public static function last_for_user($user_id, $service_id) { $user = User::find_by_id($user_id); $service = Service::find_by_id($service_id); if ( $user && $service){ $sql = "SELECT * FROM ".self::$table_name." WHERE user_id={$user_id} && service_id={$service_id} && status = 0 ORDER BY id DESC LIMIT 1"; $result_array = self::find_by_sql($sql); return !empty($result_array) ? array_shift($result_array) : false; }else{ return false; } } public static function find_by_sql($sql="") { global $database; $result_set = $database->query($sql); //var_dump($result_set); $object_array = array(); while ($row = $database->fetch_array($result_set)) { $object_array[] = self::instantiate($row); } //var_dump($object_array); return $object_array; } private static function instantiate($record){ // Could check that $record exists and is an array $object = new self; // Simple, long-form approach: // $object->id = $record['id']; // $object->username = $record['username']; // $object->password = $record['password']; // $object->first_name = $record['first_name']; // $object->last_name = $record['last_name']; // More dynamic, short-form approach: foreach($record as $attribute=>$value){ if($object->has_attribute($attribute)) { $object->$attribute = $value; } } return $object; } private function has_attribute($attribute) { // We don't care about the value, we just want to know if the key exists // Will return true or false return array_key_exists($attribute, $this->attributes()); } protected function attributes() { // return an array of attribute names and their values $attributes = array(); foreach(self::$db_fields as $field) { if(property_exists($this, $field)) { $attributes[$field] = $this->$field; } } return $attributes; } protected function sanitized_attributes() { global $database; $clean_attributes = array(); // sanitize the values before submitting // Note: does not alter the actual value of each attribute foreach($this->attributes() as $key => $value){ $clean_attributes[$key] = $database->escape_value($value); } return $clean_attributes; } public function save() { // A new record won't have an id yet. return isset($this->id) ? $this->update() : $this->create(); } public function create() { global $database; // Don't forget your SQL syntax and good habits: // - INSERT INTO table (key, key) VALUES ('value', 'value') // - single-quotes around all values // - escape all values to prevent SQL injection $attributes = $this->sanitized_attributes(); $sql = "INSERT INTO ".self::$table_name." ("; $sql .= join(", ", array_keys($attributes)); $sql .= ") VALUES ('"; $sql .= join("', '", array_values($attributes)); $sql .= "')"; if($database->query($sql)) { $this->id = $database->insert_id(); return true; } else { return false; } } public function update_transaction($sql=""){ global $database; $database->query($sql); return ($database->affected_rows() == 1) ? true : false; } public function update() { global $database; // Don't forget your SQL syntax and good habits: // - UPDATE table SET key='value', key='value' WHERE condition // - single-quotes around all values // - escape all values to prevent SQL injection $attributes = $this->sanitized_attributes(); $attribute_pairs = array(); foreach($attributes as $key => $value) { $attribute_pairs[] = "{$key}='{$value}'"; } $sql = "UPDATE ".self::$table_name." SET "; $sql .= join(", ", $attribute_pairs); $sql .= " WHERE id=". $database->escape_value($this->id); $database->query($sql); return ($database->affected_rows() == 1) ? true : false; } public function delete() { global $database; // Don't forget your SQL syntax and good habits: // - DELETE FROM table WHERE condition LIMIT 1 // - escape all values to prevent SQL injection // - use LIMIT 1 $sql = "DELETE FROM ".self::$table_name; $sql .= " WHERE id=". $database->escape_value($this->id); $sql .= " LIMIT 1"; $database->query($sql); return ($database->affected_rows() == 1) ? true : false; // NB: After deleting, the instance of User still // exists, even though the database entry does not. // This can be useful, as in: // echo $user->first_name . " was deleted"; // but, for example, we can't call $user->update() // after calling $user->delete(). } } ?> Abituriyentlar uchun testlar, bilimlar sinovining eng zamonaviy usuli - uztest.uz

Abituriyentlar uchun testlar

Bilimlar sinovining eng zamonaviy usuli

Barcha fanlar va mavzular

Fanlar bo'yicha muhokamalar

Uch blokli imtihonlar

Adolatli reyting tizimi

Ta'limga oid dasturlar

Kompyuter? Planshet? Smartfon?

Hammasida ishlaydi !!!

UzTest.uz sayti zamonaviy veb-dizayn talablaridan

kelib chiqqan holda internetga ulangan barcha

uskunalarda birdek ishlaydigan qilib yaratilgan.

Endilikda siz o'z sevimli testlaringizni barcha

qurilmalarda ishlay olasiz.

Sizda kuchli ishtiyoq

G'alabaga bo'lgan ishonch bormi?

Har qanday bilim sinalmaguncha haqiqiy bilim

hisoblanmaydi. Bilim sinalganda yaxshi natija

ko'rsatish esa faqatgina o'zimizga bog'liq.

Testlar bu bizni kerakli maqsadga erishishga

yordam beruvchi vositalardir.

Farzandlarimiz bizdan ko'ra kuchli, bilimli, dono va albatta baxtli bo'lishlari shart.

I. A. Karimov

   Biz haqimizda

UzTest.uz sayti rivojlanishiga hissa qo'shayotgan shaxslar faqat olg'a intiluvchi, o'z maqsadlarini amalga oshirish uchun qat'iy harakatda bo'lgan yoshlardan iborat.

Davomini o'qish

   Virtual imtihon topshirish

Bu yerda 3 ta fan bo'yicha virtual imtihon topshirib ko'rishingiz mumkin. O'zingizni sinab ko'ring va reytingda yuqori o'rinlarni egallang! Testlar har hafta yangilanadi.

Test topshirishga o'tish

   Top natijalar

UzTest.uz saytida muntazam ravishda test ishlab, o'z bilimlarini oshirayotgan abituriyentlarning reyting natijalari bilan tanishing.

Natijalarni ko'rish

Fanlar bo'yicha testlar


Eng ko'p yechilgan testlar




Foydalanuvchi fikrlari

I like this project very much. I am an English teacher and hope "testlar.uz" will help me and my students efficiently! Want to wish authors good luck and always going only forward!
− Yulduzka
Hammani kirib kelgan Yangi yil bilan tabriklayman.!
− Saodatjon
Saytda menga kerakli hamma testlar bor ekan. Bundan keyin internetdagi vaqtimni foydali tarzda o'tkazaman. Bo'sh qolganda aniq - testlar.uzga !
− Dilshodbek Jumaboyev
Assalomu alaykum sayt yaratilishiga xissalari qo`shilgan xurmatli, aziz insonlar!!! Sizlarni avvalombor kelayotgan 21-mart <Navro`z> bayrami bilan chin qalbimdan tabriklayman oilangizga xotirjamlik, sog`lik tilayman. Bu saytdan man juda ham ko`p foydali ma`lumotlarga ega bo`lyapman sizlarga raxmat. Imtixonga kirganda abituriyentda qo`rquv, xayajon bo`lishi tabiiy, virtual testlaringiz orqali mana shu xayajonlarimiz, qo`rquvlarimiz kamaymoqda!!! Kelajak biz yoshlarni qo`limizda ekan ozod va obod, mustaqil O`zbekistonimizda yaratilgan imkoniyatlardan albatta unumli foydalanamiz. Siz aziz insonlar esa bunda bizga ajoyib ko`mak bo`lmoqdasizlar. Yana bir bora sizlarga tashakkur bildirib qolaman!!! Hurmat ila saytning a`zosi: Mohinur...
− Mohinur
Отличная работа получилось, проста нет слов, так держать!!!! Удачи вам.
− Feruza
Ajoyib sayt ishlab chiqilibdi. Juda foydali va dolzarb masalalardan biri hal qilinibdi. Mualliflarga minnatdorchilik bildirmoqchiman. Qilingan ishlar uchun yana bir bor raxmat!
− Sayfiyev Jasurbek
Testlar.uz saytiga o'xshash saytini ko'pdan kutgan edim. Rahmat.
− Nasiba
Saytga gap bo'lishi mumkinmas. Hammangizga omad kelgusi ishlaringizda. Так держать
− Sherzod
Hozirgi paytda dolzarb saytlardan biri bo`pti. nafaqat abiturientlar, balki maktab va boshqa o`quv yurtlari o`quvchilari, umuman hamma uchun foydali.
− Hasan