adding zend project folders into old campcaster.

This commit is contained in:
naomiaro 2010-12-07 14:19:27 -05:00
parent 56abfaf28e
commit 7ef0c18b26
4045 changed files with 1054952 additions and 0 deletions

View file

@ -0,0 +1,36 @@
<?php
class User {
public function getUsers($type=NULL) {
global $CC_DBC;
$sql;
$sql_gen = "SELECT id, login, type FROM cc_subjs";
$sql = $sql_gen;
if(!is_null($type)){
if(is_array($type)) {
for($i=0; $i<count($type); $i++) {
$type[$i] = "type = '{$type[$i]}'";
}
$sql_type = join(" OR ", $type);
}
else {
$sql_type = "type = {$type}";
}
$sql = $sql_gen ." WHERE ". $sql_type;
}
return $CC_DBC->GetAll($sql);
}
public function getHosts() {
return $this->getUsers(array('H', 'A'));
}
}