net work does not work

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    net work does not work

    ok i reinstilled mysql and seen to install now but now this comes up on index page

    Fatal error: Class 'se_blog' not found in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\home.php on line 110

    link: Social Network

    if some could helpme, it mean a lot to me

    #2
    install the blog plugin from the admin panel nd then delete the the file called install_blog.php from ur server

    Comment


      #3
      ok i try that and let u know what happens

      Comment


        #4
        i have done that, and i get this on the home.php

        * @copyright 2008 radCodes * @version $Id: class_radcodes.php 2008-09-28 01:25:12 $ */ define('RADCODES_LIBRARY_VERSION', 3.10); session_start(); class rc_model { /** * @var se_database */ var $db; var $table = null; var $pk = null; var $_cols = array(); function rc_model() { global $database; $this->db =& $database; $this->_load_model_fields(); $this->_class = get_class($this); } function _build_get_records_query($criteria=null) { return "SELECT * FROM $this->table $criteria"; } function _build_count_records_query($criteria=null) { return "SELECT COUNT(*) as total FROM $this->table $criteria"; } function _build_count_field_records_query($field, $criteria=null, $options=array()) { return "SELECT $field as name, COUNT($field) as total FROM $this->table $criteria GROUP BY $field ORDER BY total DESC"; } function _build_sum_records_query($field, $criteria=null) { return "SELECT SUM($field) as total FROM $this->table $criteria"; } function _build_sum_field_records_query($fname, $fsum, $criteria=null, $options=array()) { return "SELECT $fname as name, SUM($fsum) as total FROM $this->table $criteria GROUP BY $fname ORDER BY total DESC"; } function get_records($criteria=null,$key=false) { $rows = array(); $index = 0; $res = $this->db->database_query($this->_build_get_records_query($criteria)); while($row = $this->db->database_fetch_assoc($res)) { if ($key) { $rows[$row[$this->pk]] = $row; } else { $rows[$index++] = $row; } } return $rows; } function get_record_by_criteria($criteria) { $records = $this->get_records("WHERE $criteria LIMIT 1"); return (count($records)==1) ? array_shift($records) : null; } function get_record($id) { return $this->get_record_by_criteria("$this->pk = '$id'"); } function update_by_criteria($criteria, $data) { $data_string = rc_toolkit::db_data_packer($data); return $this->db->database_query("UPDATE $this->table SET $data_string WHERE $criteria"); } function update($id, $data) { return $this->update_by_criteria("$this->pk = '$id'", $data); } function insert($data) { $data_string = rc_toolkit::db_data_packer($data); $res = $this->db->database_query("INSERT INTO $this->table SET $data_string"); return $this->db->database_insert_id(); } function delete_by_criteria($criteria) { return $this->db->database_query("DELETE FROM $this->table WHERE $criteria"); } function delete($id=null) { $this->_pre_delete($id); if ($id === null) $id = $this->{$this->pk}; $result = $this->delete_by_criteria("$this->pk = '$id'"); $this->_post_delete($id); return $result; } function delete_all() { return $this->db->database_query("DELETE FROM $this->table"); } // Lite Active Record addon function _load_model_fields() { if (!$this->table) return; //unset($_SESSION['RC_MODEL_CACHE'][get_class($this)]); if (!isset($_SESSION['RC_MODEL_CACHE'][get_class($this)]['cols'])) { $query = "SHOW COLUMNS FROM $this->table"; $res = $this->db->database_query($query); while ($row = $this->db->database_fetch_assoc($res)) { $_SESSION['RC_MODEL_CACHE'][get_class($this)]['cols'][$row['Field']] = $row; } } $this->_cols =& $_SESSION['RC_MODEL_CACHE'][get_class($this)]['cols']; } function isNew() { return !$this->{$this->pk}; } function _pre_save() { } function _post_save() { } function _pre_delete($id=null) { } function _post_delete($id=null) { } function save($options=array()) { $this->_pre_save(); if ($this->isNew()) { $this->{$this->pk} = $this->insert($this->extractProperties()); } else { $this->update($this->{$this->pk}, $this->extractProperties()); } $this->_post_save(); return $this->{$this->pk}; } /** * Get selected properties of record and put into assoc array (EXCLUDE PRIMARY KEY) * This is mainly use for db update and insert compiled data * @param array $fields Name of properties * @return array */ function extractProperties ($include_pk = false) { foreach ($this->_cols as $field => $column) { if ($field == $this->pk && $include_pk == false) continue; $row[$field] = $this->{$field}; } return $row; } /** * Set properties of current record * @return void */ function setProperties ($data) { foreach ($data as $key => $value) { if (array_key_exists($key, $this->_cols)) { $this->{$key} = $value; } } } /** * Get properties of current record * @return array */ function getProperties() { return $this->extractProperties(true); } /** * Find a record that match condition * @param string $criteria The query criteria * @return obj */ function FindRecordByCriteria ($criteria) { $records = $this->FindRecordsByCriteria("WHERE $criteria LIMIT 1"); return (count($records)==1) ? array_shift($records) : null; } /** * Get all records that match criteria * @param string $condition The query criteria * @param array $opt Optional query formatter array of key (order,limit,group) * @return array */ function FindRecordsByCriteria($criteria='', $key=true) { $objs = array(); $datas = $this->get_records($criteria, $key); foreach ($datas as $k => $data) { $obj = new $this->_class($this); $obj->setProperties($data); $objs[$k] = $obj; } return $objs; } /** * Find a record by primary key * @param int $id The primary key of record * @return obj */ function FindById($id) { return $this->FindRecordByCriteria("$this->pk='$id'"); } function ResultFunctionQuery($query,$key='total') { $res = $this->db->database_query($query); $row = $this->db->database_fetch_assoc($res); return $row[$key]; } function ResultFunctionFieldQuery($query,$key='name',$value ='total') { $records = array(); $res = $this->db->database_query($query); while ($row = $this->db->database_fetch_assoc($res)) { $records[$row['name']] = $row['total']; } return $records; } /** * Count the number of record that meet criteria * @param string $condtion The query criteria * @return int */ function CountByCriteria ($criteria=null) { $query = $this->_build_count_records_query($criteria); return $this->ResultFunctionQuery($query,'total'); } function CountFieldByCriteria($field, $criteria=null, $options=array()) { $records = array(); $query = $this->_build_count_field_records_query($field, $criteria, $options); return $this->ResultFunctionFieldQuery($query,'name','total') ; } function SumByCriteria($field, $criteria=null) { $query = $this->_build_sum_records_query($field, $criteria); return $this->ResultFunctionQuery($query,'total'); } function SumFieldByCriteria($fname, $fsum, $criteria=null, $options=array()) { $records = array(); $query = $this->_build_sum_field_records_query($fname, $fsum, $criteria, $options); return $this->ResultFunctionFieldQuery($query,'name','total') ; } } class rc_toolkit { function remote_check_plugins($type=null) { $http_host = str_replace("www.","",strtolower($_SERVER['HTTP_HOST'])); $response = file_get_contents("http://www.radcodes.com/gateway/version.php?domain=$http_host&type=$type"); $rows = explode("\n", $response); $plugins = array(); foreach ($rows as $row) { if (!isset($keys)) { $keys = explode('', $row); } else { $data = explode('',$row); foreach ($data as $k=>$v) { $data[$keys[$k]] = $v; } $plugins[$data['type']] = $data; } } return ($type === null) ? $plugins : $plugins[$type]; } function debug($var,$msg=null) { if (is_array($var) || is_object($var) || is_bool($var)) { $var = print_r($var,true); } if ($msg) { $msg = "$msg :: \n"; } echo "

        $msg$var

        "; } function get_request($key, $default = null) { if (isset($_POST[$key])) { $value = $_POST[$key]; } elseif (isset($_GET[$key])) { $value = $_GET[$key]; } else { $value = $default; } return $value; } function truncate_text($text, $length = 30, $truncate_string = '...', $truncate_lastspace = false) { if ($text == '') { return ''; } if (strlen($text) > $length) { $truncate_text = substr($text, 0, $length - strlen($truncate_string)); if ($truncate_lastspace) { $truncate_text = preg_replace('/\s+?(\S+)?$/', '', $truncate_text); } return $truncate_text.$truncate_string; } else { return $text; } } function redirect($url) { header("Location: $url"); exit(); } function redirect_referer($url) { if ($_SERVER['HTTP_REFERER'] && "http://".$_SERVER['HTTP_HOST']."/".$_SERVER["REQUEST_URI"]) { $url = $_SERVER['HTTP_REFERER']; } rc_toolkit::redirect($url); } function db_data_packer($data,$escape=true) { $set = array(); foreach ($data as $field => $value) { if ($escape) $value = addslashes($value); array_push($set, $field."='$value'"); } return implode(', ', $set); } function write_to_file($filename, $content, $mode='w') { $handle = fopen($filename, $mode); fwrite($handle, $content); fclose($handle); } function parse_rfc3339( $date ) { $date = substr( str_replace( 'T' , ' ' , $date ) , 0 , 19 ); return strtotime( $date ); } function strip_text($text) { $text = strtolower($text); // strip all non word chars $text = preg_replace('/\W/', ' ', $text); // replace all white space sections with a dash $text = preg_replace('/\ +/', '-', $text); // trim dashes $text = preg_replace('/\-$/', '', $text); $text = preg_replace('/^\-/', '', $text); return $text; } function db_to_datetime($timestamp=null) { return date('Y-m-d H:i:s', ($timestamp===null?time():$timestamp)); } function string_to_timestamp($string) { list ($date, $time) = explode(' ', $string); list ($y, $m, $d) = explode('-', $date); if (strlen($time)) { list ($h, $i, $s) = explode(':', $time); } else { $h = $i = $s = 0; } $ts = mktime($h, $i, $s, $m, $d, $y); return ($ts === -1 || $ts === false) ? null : $ts; } // why I have to function get_profile_fields() { static $fields; global $database; if ($fields === null) { $res = $database->database_query("SELECT * FROM se_profilefields ORDER BY profilefield_order ASC"); while ($row = $database->database_fetch_assoc($res)) { $fields[$row['profilefield_id']] = $row; } } return $fields; } // write these function get_profile_field($field_id) { $fields = rc_toolkit::get_profile_fields(); return $fields[$field_id]; } // function !!!! function get_profile_field_options($field_id) { $field_info = rc_toolkit::get_profile_field($field_id); $options = array(); $vals = unserialize($field_info['profilefield_options']); foreach ($vals as $v) { $options[$v['value']] = $v['label']; SE_Language::_preload($v['label']); } SE_Language::load(); return $options; } function get_profile_field_real_value($field_id, $value) { $field = rc_toolkit::get_profile_field($field_id); if ($field['profilefield_type'] == 3 || $field['profilefield_type'] == 4) { $options = rc_toolkit::get_profile_field_options($field_id); return SE_Language::_get($options[$value]); } else { return $value; } } function is_admin_dir() { $script_directory = substr($_SERVER['SCRIPT_FILENAME'], 0, strrpos($_SERVER['SCRIPT_FILENAME'], '/')); return (array_pop(explode("/", $script_directory)) == 'admin'); } function get_level_options($levelstring,$name) { $options = Array(); for($p=0;$p $levelstring.$level, $name.'_value' => $level, $name.'_option' => user_privacy_levels($level)); } } return $options; } } class rc_validator { var $errors; function rc_validator() { $this->clear_errors(); } function clear_errors() { $this->errors = array(); } function has_errors() { return count($this->errors); } function has_error($key) { return isset($this->errors[$key]); } function get_errors() { // v3 compat .. uh .. if (class_exists('SE_Language')) { foreach ($this->errors as $k=>$v) { if (is_numeric($v)) { SE_Language::_preload($v); $has_lang_id = true; } } $errors = array(); if ($has_lang_id) { SE_Language::load(); } foreach ($this->errors as $k=>$v) { if (is_numeric($v)) { $v = SE_Language::_get($v); } $errors[$k] = $v; } } else { $errors = $this->errors; } return $errors; } function get_error($key) { return $this->has_error($key) ? $this->errors[$key] : null; } function set_error($message, $key=null) { // v3 com if (is_numeric($message)) SE_Language::_preload($message); if ($key === null) { $this->errors[] = $message; } else { $this->errors[$key] = $message; } } function validate($expression, $message, $key=null) { if ($expression===true) { return true; } else { $this->set_error($message, $key); return false; } } function is_not_blank($value, $message, $key=null) { return $this->validate(strlen($value) > 0, $message, $key); } function is_not_trimmed_blank($value, $message, $key=null) { return $this->is_not_blank(trim($value), $message, $key); } function is_email($value, $messsage, $key=null) { return ($this->validate(preg_match('|^[\w\d][\w\d\,\.\-]*\@([\w\d\-]+\.)+([a-zA-Z]+)$|', $data) > 0, $message, $key)); } function is_number($value, $message, $key=null) { return $this->validate(is_numeric($value), $message, $key); } function is_date($value, $message, $key=null) { list ($y, $m, $d) = explode('-', $value); if (is_numeric($y) && is_numeric($m) && is_numeric($d)) { return $this->validate(checkdate($m,$d,$y), $message, $key); } else { return $this->validate(false, $message, $key); } } function is_datetime($value, $message, $key=null) { if (preg_match("/^(\d{4})-(\d{2})-(\d{2}) ([01][0-9]|2[0-3])[0-5][0-9])[0-5][0-9])$/", $value, $ms)) { return $this->validate(checkdate($ms[2], $ms[3], $ms[1]), $message, $key); } return $this->validate(false, $message, $key); } function is_url($value, $message, $key=null) { $pattern = '~^ (https?|ftps?):// # http or ftp (+SSL) ( ([a-z0-9-]+\.)+[a-z]{2,6} # a domain name | # or \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # a IP address ) (:[0-9]+)? # a port (optional) (/?|/\S+) # a /, nothing or a / with something $~ix'; return $this->validate(preg_match($pattern, $value) > 0, $message, $key); } } class rc_xml_parser { function get_children($vals, &$i) { $children = array(); if (isset($vals[$i]['value'])){ $children['VALUE'] = $vals[$i]['value']; } while (++$i < count($vals)){ switch ($vals[$i]['type']){ case 'cdata': if (isset($children['VALUE'])){ $children['VALUE'] .= $vals[$i]['value']; } else { $children['VALUE'] = $vals[$i]['value']; } break; case 'complete': if (isset($vals[$i]['attributes'])) { $children[$vals[$i]['tag']][]['ATTRIBUTES'] = $vals[$i]['attributes']; $index = count($children[$vals[$i]['tag']])-1; if (isset($vals[$i]['value'])){ $children[$vals[$i]['tag']][$index]['VALUE'] = $vals[$i]['value']; } else { $children[$vals[$i]['tag']][$index]['VALUE'] = ''; } } else { if (isset($vals[$i]['value'])){ $children[$vals[$i]['tag']][]['VALUE'] = $vals[$i]['value']; } else { $children[$vals[$i]['tag']][]['VALUE'] = ''; } } break; case 'open': if (isset($vals[$i]['attributes'])) { $children[$vals[$i]['tag']][]['ATTRIBUTES'] = $vals[$i]['attributes']; $index = count($children[$vals[$i]['tag']])-1; $children[$vals[$i]['tag']][$index] = array_merge($children[$vals[$i]['tag']][$index],$this->get_children($vals, $i)); } else { $children[$vals[$i]['tag']][] = $this->get_children($vals, $i); } break; case 'close': return $children; } } } function get_xml_tree($data) { if( ! $data ) return false; $parser = xml_parser_create('UTF-8'); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); xml_parse_into_struct($parser, $data, $vals, $index); xml_parser_free($parser); $tree = array(); $i = 0; if (isset($vals[$i]['attributes'])) { $tree[$vals[$i]['tag']][]['ATTRIBUTES'] = $vals[$i]['attributes']; $index = count($tree[$vals[$i]['tag']])-1; $tree[$vals[$i]['tag']][$index] = array_merge($tree[$vals[$i]['tag']][$index], $this->get_children($vals, $i)); } else { $tree[$vals[$i]['tag']][] = $this->get_children($vals, $i); } return $tree; } } class rc_tagcloud extends rc_model { var $pk = 'tag_id'; var $case_insensitive = true; function delete_name($name) { $criteria = rc_toolkit::db_data_packer(array('tag_name'=>$name )); return $this->delete_by_criteria($criteria); } function log_tag($name) { // just some safety if ($name=='') return false; if ($this->case_insensitive) $name = strtolower($name); $data = array('tag_name'=>$name); $data_string = rc_toolkit::db_data_packer($data); $tag = $this->get_record_by_criteria($data_string); if ($tag) { $data['tag_count'] = $tag['tag_count'] + 1; $this->update($tag[$this->pk],$data); return $tag[$this->pk]; } else { $data['tag_count'] = 1; return $this->insert($data); } } function get_cloud($max_entry, $order_by='count', $sort=null) { $records = $this->get_records("ORDER BY tag_count desc LIMIT $max_entry"); $columns = array(); $i=0; foreach ($records as $k=>$v) { $records[$k]['rank'] = ++$i; $columns[$k] = ($order_by == 'name') ? $records[$k]['tag_name'] : $records[$k]['tag_count']; } if ($sort === null) { $sort = ($order_by=='count') ? SORT_DESC : SORT_ASC; } array_multisort($columns, $sort, $records); return $records; } } class rc_cat extends rc_model { var $pk = 'cat_id'; var $pd = 'cat_dependency'; var $pt = 'cat_title'; var $po = 'cat_order'; var $_ref = array('table'=>'','pk'=>'','pc'=>''); function _build_get_records_query($criteria=null) { $criteria = str_replace(array($this->pk, $this->pd, $this->pt, $this->po), array('a.'.$this->pk, 'a.'.$this->pd, 'a.'.$this->pt, 'a.'.$this->po), $criteria ); $query = "SELECT a.*, b.cat_id as parent_cat_id, b.cat_title as parent_cat_title FROM $this->table as a LEFT JOIN $this->table as b ON b.{$this->pk} = a.{$this->pd} $criteria "; return $query; } function FindRecordsByCriteria($criteria='', $key=true) { $objs = array(); $datas = $this->get_records($criteria, $key); //rc_toolkit::debug($datas,"datas"); foreach ($datas as $k => $data) { $obj = new $this->_class($this); $obj->setProperties($data); $obj->parent_cat_id = $data['parent_cat_id']; $obj->parent_cat_title = $data['parent_cat_title']; $objs[$k] = $obj; } return $objs; } function count_items($options=array()) { $rc = $this->_ref['pc']; $query = "SELECT $rc as name, COUNT($rc) as total FROM {$this->_ref['table']} LEFT JOIN $this->table ON $this->table.$this->pk = $rc GROUP BY $rc "; return $this->ResultFunctionFieldQuery($query,'name','total') ; } function get_struct_categories($pid=null) { static $cats; if ($cats === null) { $records = $this->FindRecordsByCriteria("ORDER BY $this->po ASC"); $cats = array(); foreach ($records as $k => $r) { $parent = $r->{$this->pd} > 0 ? $r->{$this->pd} : 0; $cats[$parent][$r->{$this->pk}] = $r; } } return $pid === null ? $cats : (array)$cats[$pid]; } function get_categories($parent=0,$subcat=true) { $cats = $this->get_struct_categories($parent); if ($subcat) { foreach ($cats as $k=>$v) { $cats[$k]->subcategories = $this->get_categories($v->cat_id, false); } } return $cats; } function get_category_tree() { $stats = $this->count_items(); $cats = $this->get_categories(0,true); $sumcats = 0; foreach ($cats as $k=>$v) { $cnt = $stats[$k] ? $stats[$k] : 0; $cats[$k]->count = $cnt; $subtotal = 0; if (is_array($v->subcategories)) { foreach ($v->subcategories as $kk=>$vv) { $cnt = $stats[$kk] ? $stats[$kk] : 0; $cats[$k]->subcategories[$kk]->count = $cnt; $subtotal += $cnt; } } $cats[$k]->subtotal = $subtotal; $cats[$k]->total = $cats[$k]->count + $cats[$k]->subtotal; $sumcats += $cats[$k]->total; } $total = array_sum($stats); $uncategorized = $total - $sumcats; $tree = array( 'stats' => $stats, 'categories' => $cats, 'total' => $total, 'uncategorized' => $uncategorized ); } function get_max_id() { $row = $this->db->database_fetch_assoc($this->db->database_query("SELECT max($this->pk) AS max_id FROM $this->table")); return $row['max_id']; } function add_new($title, $parent=0) { $class = get_class($this); $obj = new $class; $obj->{$obj->pt} = $title; $obj->{$obj->pd} = (int) $parent; $obj->{$obj->po} = $this->get_max_id() + 1; $obj->save(); return $obj; } function delete_category($id) { $subcats = $this->get_categories($id,false); $cat_ids = array($id); if (count($subcats)) { $cat_ids = array_merge($cat_ids, array_keys($subcats)); } $cat_id_str = join("','",$cat_ids); $this->delete_by_criteria("$this->pd = '$id'"); $this->delete($id); $query = "UPDATE {$this->_ref['table']} SET {$this->_ref['pc']} = '0' WHERE {$this->_ref['pc']} IN ('$cat_id_str')"; $this->db->database_query($query); } function ordering($direction) { if ($direction == 'down') { $operation = '>'; $ordering = 'asc'; } else { $operation = '<'; $ordering = 'desc'; } $cat_id = $this->{$this->pk}; $cat_order = $this->{$this->po}; $cat_dependency = $this->{$this->pd}; $other = $this->FindRecordByCriteria("$this->pk <> '$cat_id' AND $this->pd = '$cat_dependency' AND $this->po $operation '$cat_order' ORDER BY $this->po $ordering"); if ($other) { $this->{$this->po} = $other->{$this->po}; $this->save(); $other->{$this->po} = $cat_order; $other->save(); } } } class rc_categories extends rc_model { var $pk = 'id'; // primary var $pd = 'dependency'; // dependency col var $pt = 'title'; // title col function get_categories($parent=0,$subcat=true) { $rows = $this->get_records("WHERE $this->pd = '$parent' ORDER BY $this->pk",true); if ($subcat) { foreach ($rows as $k=>$row) { $rows[$k]['subcategories'] = $this->get_categories($row[$this->pk],false); $rows[$k]['next_subcat'] = 1; if (count($rows[$k]['subcategories'])) { $rows[$k]['next_subcat'] += max(array_keys($rows[$k]['subcategories'])); } } } return $rows; } function get_max_id() { $row = $this->db->database_fetch_assoc($this->db->database_query("SELECT max($this->pk) AS max_id FROM $this->table")); return $row['max_id']; } function save_categories($maincats, $subcats) { if (!is_array($maincats)) return; foreach ($maincats as $mid=>$title) { if (!strlen(trim($title))) { // title is blank, ie $this->delete($mid); // delete row $this->delete_by_criteria("$this->pd = '$mid'"); // delete all children } else { $mctemp = $this->get_record_by_criteria("$this->pk = '$mid' and $this->pd = '0'"); // check if row exists if ($mctemp) { $mctemp[$this->pt] = $title; $this->update($mctemp[$this->pk],$mctemp); // update $nid = $mid; } else { $mctemp = array($this->pt => $title, $this->pd => 0); $nid = $this->insert($mctemp); } if (is_array($subcats[$mid])) { foreach ($subcats[$mid] as $sid => $title) { if (!strlen(trim($title))) { $this->delete_by_criteria("$this->pk = '$sid' and $this->pd = '$mid'"); } else { $sctemp = $this->get_record_by_criteria("$this->pk = '$sid' and $this->pd = '$mid'"); if ($sctemp) { $sctemp[$this->pt] = $title; $this->update($sctemp[$this->pk], $sctemp); } else { $sctemp = array($this->pt => $title, $this->pd => $nid); $this->insert($sctemp); } } } } } } } } class rc_tag extends rc_model { var $table = null; var $pk = 'tag_id'; // primary key var $po = 'tag_object_id'; // object ref key var $pn = 'tag_name'; var $_glue = ','; function clean_input_tags($input_tags) { if (is_array($input_tags)) { $tags = array(); foreach ($input_tags as $k => $v) { $trim_v = trim($v); if (strlen($trim_v)) { $tags[] = $trim_v; } } return $tags; } else { return $this->clean_input_tags(explode($this->_glue, $input_tags)); } } function get_object_tags($object_id) { $tags = array(); $query = "SELECT * FROM $this->table WHERE $this->po = '$object_id'"; $res = $this->db->database_query($query); while ($row = $this->db->database_fetch_assoc($res)) { $tags[$row[$this->pk]] = $row[$this->pn]; } return $tags; } function update_object_tags($object_id, $string_tags) { $cur_tags = $this->get_object_tags($object_id); $new_tags = $this->clean_input_tags($string_tags); $insert_tags = array_diff($new_tags, $cur_tags); foreach ($insert_tags as $name) { $data = array($this->po => $object_id, $this->pn => $name); $this->insert($data); } $delete_tags = array_diff($cur_tags, $new_tags); foreach ($delete_tags as $name) { $this->delete_by_criteria("$this->po = '$object_id' AND $this->pn = '$name'"); } } function delete_object_tags($object_id) { $this->delete_by_criteria("$this->po = '$object_id'"); } function get_popular_tags($limit=100, $order_by='count', $sort=null, $classes=array(1,3,7,10,20,40,65,100)) { $query = "SELECT $this->pn as name, COUNT(*) as count FROM $this->table GROUP BY $this->pn ORDER BY count DESC LIMIT $limit"; $res = $this->db->database_query($query); $columns = array(); $i = 0; $max_class = count($classes) + 1; while ($row = $this->db->database_fetch_assoc($res)) { $i++; $records[$i] = $row; $records[$i]['rank'] = $i; $columns[$i] = ($order_by == 'name') ? $records[$i]['name'] : $records[$i]['count']; foreach ($classes as $k=>$bound) { if ($i <= $bound) { $records[$i]['class'] = $k + 1; break; } } if (!isset($records[$i]['class'])) $records[$i]['class'] = $max_class; } if ($sort === null) { $sort = ($order_by=='count') ? SORT_DESC : SORT_ASC; } array_multisort($columns, $sort, $records); return $records; } function get_object_ids_tagged_with($tags) { $ids = array(); $tags = $this->clean_input_tags($tags); $query = "SELECT DISTINCT $this->po FROM $this->table WHERE $this->pn IN ('" .join("','", $tags). "')"; $res = $this->db->database_query($query); while ($row = $this->db->database_fetch_assoc($res)) { $ids[] = $row[$this->po]; } return $ids; } function get_object_tags_by_object_ids($ids) { $criteria = "WHERE $this->po IN ('". join("','",$ids) ."')"; $records = $this->FindRecordsByCriteria($criteria); $data = array(); foreach ($records as $row) { $data[$row->{$this->po}][$row->{$this->pk}] = $row->{$this->pn}; } return $data; } } class rc_level extends rc_model { var $table = 'se_levels'; var $pk = 'level_id'; } class rc_field extends rc_model { var $table = 'se_fields'; var $pk = 'field_id'; } class rc_user extends rc_model { var $table = 'se_users'; var $pk = 'user_id'; /** * @var se_user */ var $se_user; function rc_user() { rc_model::rc_model(); $this->se_user = new se_user(); } function setProperties($data) { rc_model::setProperties($data); $this->load_se_user(); } function load_se_user() { $user = new se_user(); $user->user_exists = 1; $user->user_info = $this->getProperties(); $this->se_user = $user; $this->se_user->user_displayname(); $this->user_displayname_short = $this->se_user->user_displayname_short; $this->user_displayname = $this->se_user->user_displayname; return $this->se_user; } } class rc_profile extends rc_model { var $table = 'se_profile'; var $pk = 'profile_id'; } class rc_comment extends rc_model { var $type = ''; var $table; var $pk; // id var $po; // comment_[type]_id var $pa; // authoruser_id var $pd; // comment_date var $pb; // comment_body var $identifier; function rc_comment($identifier=null) { $type = $this->type; $this->table = "rc_{$type}comments"; $this->pk = $type.'comment_id'; $this->po = $type.'comment_'.$type.'_id'; $this->pa = $type.'comment_authoruser_id'; $this->pd = $type.'comment_date'; $this->pb = $type.'comment_body'; $this->identifier = $identifier; rc_model::rc_model(); } function count_by_object_ids($ids) {$criteria = "WHERE $this->po IN ('" . join("','",$ids) . "')"; return $this->CountFieldByCriteria($this->po, $criteria); } function _build_get_records_query($criteria=null) { $u = new rc_user(); $query = "SELECT {$this->table}.*, se_users.* FROM $this->table JOIN $u->table ON {$this->table}.{$this->pa} = {$u->table}.{$u->pk} $criteria"; return $query; } function FindRecordsByCriteria($criteria='', $key=true) { $objs = array(); $datas = $this->get_records($criteria, $key); foreach ($datas as $k => $data) { $obj = new $this->_class($this); $obj->setProperties($data); $rc_user = new rc_user(); $rc_user->setProperties($data); $obj->rc_user = $rc_user; $objs[$k] = $obj; } return $objs; } function comment_total() { return $this->CountByCriteria("WHERE $this->po='$this->identifier'"); } function comment_list($start, $limit) { $critiera = "WHERE $this->po = '$this->identifier' ORDER BY $this->pk DESC LIMIT $start, $limit"; $comments = $this->FindRecordsByCriteria($critiera); $comment_array = array(); foreach ($comments as $comment) { $comment_array[] = array( 'comment_id' => $comment->{$this->pk}, 'comment_author' => $comment->rc_user->se_user, 'comment_date' => $comment->{$this->pd}, 'comment_body' => $comment->{$this->pb} ); } return $comment_array; } function comment_delete_selected($start, $limit) { $ids = array(); foreach ($_POST as $k=>$v) { if (strstr($k, 'comment_') && $v==1) { $ids[] = str_replace('comment_','', $k); } } $this->delete_by_criteria("$this->po = '$this->identifier' AND $this->pk IN ('" . join("','",$ids) . "')"); } function comment_post($object_id, $author_id, $body) { $class = get_class($this); $object = new $class; $object->{$object->po} = $object_id; $object->{$object->pa} = $author_id; $object->{$object->pb} = $body; $object->{$object->pd} = time(); return $object->save(); } } class rc_vote extends rc_model { var $table = null; var $pk = 'vote_id'; // primary key var $po = 'vote_object_id'; // object ref key var $pu = 'vote_user_id'; // user id var $pd = 'vote_date'; // create var $pc = 'vote_comment'; // comment function _pre_save() { if ($this->isNew() and empty($this->{$this->pd})) { $this->{$this->pd} = time(); } } function _build_count_records_query($criteria=null) { $u = new rc_user(); $query = "SELECT COUNT({$this->table}.{$this->pk}) as total FROM $this->table JOIN {$u->table} ON {$u->table}.{$u->pk} = {$this->table}.{$this->pu} $criteria "; return $query; } function _build_get_records_query($criteria=null) { $u = new rc_user(); $query = "SELECT * FROM $this->table JOIN {$u->table} ON {$u->table}.{$u->pk} = {$this->table}.{$this->pu} $criteria "; return $query; } function FindRecordsByCriteria($criteria='', $key=true) { $objs = array(); $datas = $this->get_records($criteria, $key); foreach ($datas as $k => $data) { $obj = new $this->_class($this); $obj->setProperties($data); $rc_user = new rc_user(); $rc_user->setProperties($data); $obj->rc_user = $rc_user; $objs[$k] = $obj; } return $objs; } function get_vote($user_id, $object_id) { return $this->FindRecordByCriteria("$this->po='$object_id' AND $this->pu='$user_id'"); } function has_vote($user_id, $object_id) { $total = $this->CountByCriteria("WHERE $this->po='$object_id' AND $this->pu='$user_id'"); return $total > 0; } function count_by_user_id($user_id) { $criteria = "WHERE $this->pu = '$user_id'"; return $this->CountByCriteria($criteria); } function count_by_object_id($object_id) { $criteria = "WHERE $this->po = '$object_id'"; return $this->CountByCriteria($criteria); } function get_by_object_id($object_id, $limit=null, $sort=null) { $criteria = "WHERE $this->po = '$object_id' "; $criteria .= " ORDER BY " . ($sort ? $sort : "$this->pd asc"); if ($limit !== null) $criteria .= " LIMIT $limit "; return $this->FindRecordsByCriteria($criteria); } function delete_by_object_id($object_id) { $this->delete_by_criteria("$this->po = '$object_id'"); } function register_vote($object_id, $user_id, $comment='') { $this->{$this->po} = $object_id; $this->{$this->pu} = $user_id; $this->{$this->pc} = $comment; return $this->save(); } function unregister_vote($object_id, $user_id) { $this->delete_by_criteria("$this->po = '$object_id' AND $this->pu = '$user_id'"); } function count_voters($where="") { $query = "SELECT COUNT(distinct user_id) as total FROM $this->table JOIN se_users ON se_users.user_id = {$this->table}.{$this->pu} $where "; return $this->ResultFunctionQuery($query,'total'); } function get_voters($start=0, $limit=10, $where="", $sort="total_votes DESC") { $query = "SELECT se_users.*, COUNT($this->pk) as total_votes FROM se_users JOIN $this->table ON se_users.user_id = {$this->table}.{$this->pu} $where GROUP BY se_users.user_id ORDER BY $sort LIMIT $start, $limit "; $rc_users = $this->_get_popular_users_count($query); return $rc_users; } // sample usage where object is an user function count_objecters($where="") { $query = "SELECT COUNT(distinct user_id) as total FROM $this->table JOIN se_users ON se_users.user_id = {$this->table}.{$this->po} $where "; return $this->ResultFunctionQuery($query,'total'); } // sample usage where object is an user function get_objecters($start=0, $limit=10, $where="", $sort="total_votes DESC") { $query = "SELECT se_users.*, COUNT($this->pk) as total_votes FROM se_users JOIN $this->table ON se_users.user_id = {$this->table}.{$this->po} $where GROUP BY se_users.user_id ORDER BY $sort LIMIT $start, $limit "; $rc_users = $this->_get_popular_users_count($query); return $rc_users; } function get_object_ids_voted_by($user_id) { $ids = array(); $query = "SELECT DISTINCT $this->po FROM $this->table WHERE $this->pu = '$user_id'"; $res = $this->db->database_query($query); while ($row = $this->db->database_fetch_assoc($res)) { $ids[] = $row[$this->po]; } return $ids; } function _get_popular_users_count($query) { $res = $this->db->database_query($query); $rc_users = array(); while ($r = $this->db->database_fetch_assoc($res)) { $rc_user = new rc_user(); $rc_user->setProperties($r); $rc_user->total_votes = $r['total_votes']; // lazy $rc_users[] = $rc_user; } return $rc_users; } } class rc_pager { /** * The current page number * @type int */ var $page; /** * Number of record in each page * @type int */ var $page_size; /** * Total number of rows in record set * @type int */ var $total_entries; /** * Total number of pages * @type int */ var $total_pages; /** * Contruct a new Paginator instance * * @param $page The current page number * @param $page_size The number of record show in 1 page * @param $total_entries The total number of row in record set * * @return void */ function rc_pager ($page, $page_size, $total_entries) { $this->page = $page; $this->page_size = $page_size; $this->total_ entries = $total_entries; $this->total_pages = ceil($this->total_entries / $this->page_size); if( $this->page > $this->total_pages ) { $this->page = $this->total_pages; } if( $this->page < 1 ) { $this->page = 1; } $this->offset = ( $this->page - 1 ) * $this->page_size; } function assign_smarty_vars($page_entries=null) { global $smarty; if ($page_entries === null) { if ($this->total_pages > $this->page) { $page_entries = $this->page_size; } else { $page_entries = $total_entries - ($this->total_pages - 1) * $this->page_size; } } $smarty->assign('total_entries', $this->total_entries); $smarty->assign('p', $this->page); $smarty->assign('maxpage', $this->total_pages); $smarty->assign('p_start', $this->offset + 1); $smarty->assign('p_end', $this->offset + $page_entries); } } get_records("ORDER BY $order"); $stats = $this->count_category_articles($options['count_criteria']); $categories = array(); // build subcats foreach ($raw_cats as $cat) { if ($cat['articlecat_dependency'] != 0) { $subcats[$cat['articlecat_dependency']][] = array( 'subcategory_id' => $cat['articlecat_id'], 'subcategory_title' => $cat['articlecat_title'], 'subcategory_totalarticles' => ($stats[$cat['articlecat_id']] ? $stats[$cat['articlecat_id']] : 0) ); } } // build main cat foreach ($raw_cats as $cat) { if ($cat['articlecat_dependency'] == 0) { $articlecat_totalarticles = $stats[$cat['articlecat_id']] ? $stats[$cat['articlecat_id']] : 0; $articlecat_subcats = isset($subcats[$cat['articlecat_id']]) ? $subcats[$cat['articlecat_id']] : array(); $expanded = $options['expanded_category_id'] == $cat['articlecat_id']; foreach ($articlecat_subcats as $sc) { $articlecat_totalarticles += $sc['subcategory_totalarticles']; $expanded = $expanded || $options['expanded_category_id'] == $sc['subcategory_id']; } $categories[] = array( "articlecat_id" => $cat['articlecat_id'], "articlecat_title" => $cat['articlecat_title'], "articlecat_totalarticles" => $articlecat_totalarticles, "articlecat_expanded" => $expanded ? 1 : 0, "articlecat_subcats" => $articlecat_subcats ); } } return $categories; } function count_category_articles($criteria = null) { $stats = array(); if (strlen($criteria)) $where = " WHERE $criteria"; $query = "SELECT article_articlecat_id as category_id, COUNT(article_id) as total FROM se_articles $where GROUP BY article_articlecat_id"; $res = $this->db->database_query($query); while ($row = $this->db->database_fetch_assoc($res)) { $stats[$row['category_id']] = $row['total']; } return $stats; } } class rc_article { // INITIALIZE VARIABLES var $is_error; // DETERMINES WHETHER THERE IS AN ERROR OR NOT var $error_message; // CONTAINS RELEVANT ERROR MESSAGE var $user_id; // CONTAINS THE USER ID OF THE USER WHOSE ARTICLES WE ARE EDITING OR THE LOGGED-IN USER var $is_member; // DETERMINES WHETHER USER IS IN THE ARTICLEMEMBER TABLE OR NOT var $article_exists; // DETERMINES WHETHER THE ARTICLE HAS BEEN SET AND EXISTS OR NOT var $article_info; // CONTAINS THE ARTICLE INFO OF THE ARTICLE WE ARE EDITING var $articleowner_level_info; // CONTAINS THE ARTICLE CREATOR'S LEVEL INFO var $articlemember_info; // CONTAINS THE ARTICLE MEMBER INFO FOR THE LOGGED-IN USER // THIS METHOD SETS INITIAL VARS // INPUT: $user_id (OPTIONAL) REPRESENTING THE USER ID OF THE USER WHOSE ARTICLES WE ARE CONCERNED WITH // $article_id (OPTIONAL) REPRESENTING THE ARTICLE ID OF THE ARTICLE WE ARE CONCERNED WITH // OUTPUT: function rc_article($user_id = 0, $article_id = 0) { global $database, $user; $this->user_id = $user_id; $this->article_exists = 0; $this->is_member = 0; if($article_id != 0) { $article = $database->database_query("SELECT * FROM se_articles WHERE article_id='$article_id'"); if($database->database_num_rows($article) == 1) { $this->article_exists = 1; $this->article_info = $database->database_fetch_assoc($article); // GET LEVEL INFO if($this->article_info[article_user_id] == $user->user_info[user_id]) { $this->articleowner_level_info = $user->level_info; } else { $this->articleowner_level_info = $database->database_fetch_assoc($database->database_query("SELECT se_levels.* FROM se_users LEFT JOIN se_levels ON se_users.user_level_id=se_levels.level_id WHERE se_users.user_id='".$this->article_info[article_user_id]."'")); } } } } // END se_article() METHOD // THIS METHOD RETURNS THE TOTAL NUMBER OF ARTICLES // INPUT: $where (OPTIONAL) REPRESENTING ADDITIONAL THINGS TO INCLUDE IN THE WHERE CLAUSE // $article_details (OPTIONAL) REPRESENTING A BOOLEAN THAT DETERMINES WHETHER TO RETRIEVE ARTICLE CREATOR // OUTPUT: AN INTEGER REPRESENTING THE NUMBER OF ARTICLES function article_total($where = "", $article_details = 0) { global $database; // BEGIN ENTRY QUERY $article_query = "SELECT article_id FROM se_articles LEFT JOIN se_articlecats ON se_articles.article_articlecat_id=se_articlecats.a rticlecat_id"; // IF NO USER ID SPECIFIED, JOIN TO USER TABLE if($article_details == 1) { $article_query .= " LEFT JOIN se_users ON se_articles.article_user_id=se_users.user_id"; } // ADD WHERE IF NECESSARY if($where != "" | $this->user_id != 0) { $article_query .= " WHERE"; } // ENSURE USER ID IS NOT EMPTY if($this->user_id != 0) { $article_query .= " article_user_id='".$this->user_id."'"; } // INSERT AND IF NECESSARY if($this->user_id != 0 & $where != "") { $article_query .= " AND"; } // ADD WHERE CLAUSE, IF NECESSARY if($where != "") { $article_query .= " $where"; } // GET AND RETURN TOTAL BLOG ENTRIES $article_total = $database->database_num_rows($database->database_query($article_query)); return $article_total; } // END article_total() METHOD // THIS METHOD RETURNS AN ARRAY OF ARTICLES // INPUT: $start REPRESENTING THE ARTICLE TO START WITH // $limit REPRESENTING THE NUMBER OF ARTICLES TO RETURN // $sort_by (OPTIONAL) REPRESENTING THE ORDER BY CLAUSE // $where (OPTIONAL) REPRESENTING ADDITIONAL THINGS TO INCLUDE IN THE WHERE CLAUSE // $article_details (OPTIONAL) REPRESENTING A BOOLEAN THAT DETERMINES WHETHER TO RETRIEVE ARTICLE CREATOR // OUTPUT: AN ARRAY OF ARTICLES function article_list($start, $limit, $sort_by = "article_id DESC", $where = "", $article_details = 0) { global $database, $user, $owner; // BEGIN QUERY $article_query = "SELECT se_articles.*, se_articlecats.articlecat_title, count(articlecomment_id) AS total_comments"; // IF NO USER ID SPECIFIED, RETRIEVE USER INFORMATION if($this->user_id == 0) { $article_query .= ", se_users.user_id, se_users.user_username, se_users.user_photo, se_users.user_fname, se_users.user_lname "; } // CONTINUE QUERY $article_query .= " FROM se_articles LEFT JOIN se_articlecats ON se_articles.article_articlecat_id=se_articlecats.a rticlecat_id LEFT JOIN se_articlecomments ON se_articles.article_id=se_articlecomments.articlec omment_article_id"; // IF NO USER ID SPECIFIED, JOIN TO USER TABLE if($this->user_id == 0) { $article_query .= " LEFT JOIN se_users ON se_articles.article_user_id=se_users.user_id"; } // ADD WHERE IF NECESSARY if($where != "" | $this->user_id != 0) { $article_query .= " WHERE"; } // ENSURE USER ID IS NOT EMPTY if($this->user_id != 0) { $article_query .= " article_user_id='".$this->user_id."'"; } // INSERT AND IF NECESSARY if($this->user_id != 0 & $where != "") { $article_query .= " AND"; } // ADD WHERE CLAUSE, IF NECESSARY if($where != "") { $article_query .= " $where"; } // ADD GROUP BY, ORDER, AND LIMIT CLAUSE $article_query .= " GROUP BY article_id ORDER BY $sort_by LIMIT $start, $limit"; // RUN QUERY $articleentries = $database->database_query($article_query); $rc_tag = new rc_articletag(); // GET BLOG ENTRIES INTO AN ARRAY $article_array = Array(); while($article_info = $database->database_fetch_assoc($articleentries)) { // CREATE OBJECT FOR EVENT $article = new rc_article($article_info[user_id]); $article->article_exists = 1; $article->article_info= $article_info; // CONVERT HTML CHARACTERS BACK //$article_body = str_replace("\r\n", "", html_entity_decode($article_info[article_body])); // IF NO USER ID SPECIFIED, CREATE OBJECT FOR AUTHOR if($this->user_id == 0) { $author = new se_user(); $author->user_exists = 1; $author->user_info[user_id] = $article_info[user_id]; $author->user_info[user_username] = $article_info[user_username]; $author->user_info[user_photo] = $article_info[user_photo]; $author->user_info[user_fname] = $article_info[user_fname]; $author->user_info[user_lname] = $article_info[user_lname]; // OTHERWISE, SET AUTHOR TO OWNER/LOGGED-IN USER } elseif($owner->user_exists != 0 & $owner->user_info[user_id] == $article_info[article_user_id]) { $author = $owner; } elseif($user->user_exists != 0 & $user->user_info[user_id] == $article_info[article_user_id]) { $author = $user; } $author->user_displayname(); // SET EVENT ARRAY $article_array[] = Array('article' => $article, 'tags' => $rc_tag->get_object_tags($article_info['article_id']), 'article_author' => $author); } // RETURN ARRAY return $article_array; } // END article_list() METHOD // THIS METHOD CREATES A NEW ARTICLE // INPUT: $article_title REPRESENTING THE ARTICLE TITLE // $article_body REPRESENTING THE ARTICLE DESCRIPTION // $articlecat_id REPRESENTING THE ARTICLE CATEGORY ID // $article_date_start REPRESENTING THE ARTICLE'S START TIMESTAMP // $article_search REPRESENTING WHETHER THE ARTICLE SHOULD BE SEARCHABLE // $article_privacy REPRESENTING THE PRIVACY OF THE ARTICLE // $article_comments REPRESENTING WHO CAN POST COMMENTS ON THE ARTICLE // $article_draft REPRESENTING WHETHER THE ARTICLE IS A DRAFT // OUTPUT: THE NEWLY CREATED ARTICLE'S ARTICLE ID function article_create($article_title, $article_body, $articlecat_id, $article_date_start, $article_draft, $article_approved, $article_search, $article_privacy, $article_comments) { global $database; $article_slug = $this->generate_slug($article_title); // ADD ROW TO ARTICLES TABLE $database->database_query("INSERT INTO se_articles (article_user_id, article_articlecat_id, article_title, article_body, article_date_start, article_draft, article_approved, article_search, article_privacy, article_comments, article_slug) VALUES ('".$this->user_id."', '$articlecat_id', '$article_title', '$article_body', '$article_date_start', '$article_draft', '$article_approved', '$article_search', '$article_privacy', '$article_comments', '$article_slug')"); $article_id = $database->database_insert_id(); // MAKE CREATOR A MEMBER $database->database_query("INSERT INTO se_articlemembers (articlemember_user_id, articlemember_article_id, articlemember_status) VALUES ('".$this->user_id."', '$article_id', '1')"); // ADD ARTICLE STYLES ROW $database->database_query("INSERT INTO se_articlestyles (articlestyle_article_id) VALUES ('$article_id')"); // ADD ARTICLE ALBUM $database->database_query("INSERT INTO se_articlealbums (articlealbum_article_id, articlealbum_datecreated, articlealbum_dateupdated, articlealbum_title, articlealbum_desc, articlealbum_search, articlealbum_privacy, articlealbum_comments) VALUES ('$article_id', '".time()."', '".time()."', '', '', '$article_search', '$article_privacy', '$article_comments')"); // ADD ARTICLE DIRECTORY $article_directory = $this->article_dir($article_id); $article_path_array = explode("/", $article_directory); array_pop($article_path_array); array_pop($article_path_array); $subdir = implode("/", $article_path_array)."/"; if(!is_dir($subdir)) { mkdir($subdir, 0777); chmod($subdir, 0777); $handle = fopen($subdir."index.php", 'x+'); fclose($handle); } mkdir($article_directory, 0777); chmod($article_directory, 0777); $handle = fopen($article_directory."/index.php", 'x+'); fclose($handle); return $article_id; } // END article_create() METHOD // THIS METHOD DELETES AN ARTICLE // INPUT: $article_id (OPTIONAL) REPRESENTING THE ID OF THE ARTICLE TO DELETE // OUTPUT: function article_delete($article_id = 0) { global $database; if($article_id == 0) { $article_id = $this->article_info[article_id]; } $database->database_query("DELETE FROM se_articletags WHERE tag_object_id='$article_id'"); // DELETE ARTICLE ALBUM, MEDIA, MEDIA COMMENTS $database->database_query("DELETE FROM se_articlealbums, se_articlemedia, se_articlemediacomments USING se_articlealbums LEFT JOIN se_articlemedia ON se_articlealbums.articlealbum_id=se_articlemedia.a rticlemedia_articlealbum_id LEFT JOIN se_articlemediacomments ON se_articlemedia.articlemedia_id=se_articlemediacom ments.articlemediacomment_articlemedia_id WHERE se_articlealbums.articlealbum_article_id='$article _id'"); // DELETE ARTICLE ROW $database->database_query("DELETE FROM se_articles WHERE se_articles.article_id='$article_id'"); // DELETE ARTICLE COMMENTS $database->database_query("DELETE FROM se_articlecomments WHERE se_articlecomments.articlecomment_article_id='$art icle_id'"); // DELETE ARTICLE'S FILES if(is_dir($this->article_dir($article_id))) { $dir = $this->article_dir($article_id); } else { $dir = ".".$this->article_dir($article_id); } if($dh = opendir($dir)) { while(($file = readdir($dh)) !== false) { if($file != "." & $file != "..") { unlink($dir.$file); } } closedir($dh); } rmdir($dir); } // END article_delete() METHOD // THIS METHOD DELETES SELECTED ARTICLES // INPUT: $start REPRESENTING THE GROUP TO START WITH // $limit REPRESENTING THE NUMBER OF GROUPS TO RETURN // $sort_by (OPTIONAL) REPRESENTING THE ORDER BY CLAUSE // $where (OPTIONAL) REPRESENTING ADDITIONAL THINGS TO INCLUDE IN THE WHERE CLAUSE // $article_details (OPTIONAL) REPRESENTING A BOOLEAN THAT DETERMINES WHETHER TO RETRIEVE ARTICLE CREATOR // OUTPUT: AN ARRAY OF ARTICLES function article_delete_selected($start, $limit, $sort_by = "article_id DESC", $where = "", $article_details = 0) { global $database, $user; // BEGIN QUERY $article_query = "SELECT se_articles.*"; // SELECT RELEVANT ARTICLE DETAILS IF NECESSARY if($article_details == 1) { $article_query .= ", se_users.user_id, se_users.user_username"; } // IF USER ID NOT EMPTY, GET USER AS MEMBER if($this->user_id != 0) { $article_query .= ", se_articlemembers.articlemember_status"; } // CONTINUE QUERY $article_query .= " FROM"; // IF USER ID NOT EMPTY, SELECT FROM ARTICLEMEMBER TABLE if($this->user_id != 0) { $article_query .= " se_articlemembers LEFT JOIN se_articles ON se_articlemembers.articlemember_article_id=se_arti cles.article_id "; } else { $article_query .= " se_articles"; } // CONTINUE QUERY IF NECESSARY if($article_details == 1) { $article_query .= " LEFT JOIN se_users ON se_articles.article_user_id=se_users.user_id"; } // ADD WHERE IF NECESSARY if($where != "" | $this->user_id != 0) { $article_query .= " WHERE"; } // IF USER ID NOT EMPTY, MAKE SURE USER IS A MEMBER if($this->user_id != 0) { $article_query .= " se_articlemembers.articlemember_user_id='".$this->user_id."' AND se_articlemembers.articlemember_status<>'-1'"; } // INSERT AND IF NECESSARY if($this->user_id != 0 & $where != "") { $article_query .= " AND"; } // ADD WHERE CLAUSE, IF NECESSARY if($where != "") { $article_query .= " $where"; } // ADD GROUP BY, ORDER, AND LIMIT CLAUSE $article_query .= " GROUP BY article_id ORDER BY $sort_by LIMIT $start, $limit"; // RUN QUERY $articles = $database->database_query($article_query); // GET ARTICLES INTO AN ARRAY while($article_info = $database->database_fetch_assoc($articles)) { $var = "delete_article_".$article_info[article_id]; if($_POST[$var] == 1) { $this->article_delete($article_info[article_id]); } } } // END article_delete_selected() METHOD // THIS METHOD UPDATES THE ARTICLE'S LAST UPDATE DATE // INPUT: // OUTPUT: function article_lastupdate() { global $database; $database->database_query("UPDATE se_articles SET article_dateupdated='".time()."' WHERE article_id='".$this->article_info[article_id]."'"); } // END article_lastupdate() METHOD function article_owner() { if (!$this->article_owner) { $this->article_owner = new se_user(Array($this->article_info[article_user_id])); $this->article_owner->user_displayname(); } } // THIS METHOD RETURNS MAXIMUM PRIVACY LEVEL VIEWABLE BY A USER WITH REGARD TO THE CURRENT ARTICLE // INPUT: $user REPRESENTING A USER OBJECT // $allowable_privacy (OPTIONAL) REPRESENTING A STRING OF ALLOWABLE PRIVACY SETTINGS // OUTPUT: RETURNS THE INTEGER REPRESENTING THE MAXIMUM PRIVACY LEVEL VIEWABLE BY A USER WITH REGARD TO THE CURRENT ARTICLE function article_privacy_max($user, $allowable_privacy = "0123456") { global $database; $this->article_owner(); $privacy_level = 6; if ($this->article_owner->user_exists) { $privacy_level = $this->article_owner->user_privacy_max($user, $allowable_privacy); } return $privacy_level; } // END article_privacy_max() METHOD // THIS METHOD RETURNS THE PATH TO THE GIVEN ARTICLE'S DIRECTORY // INPUT: $article_id (OPTIONAL) REPRESENTING A ARTICLE'S ARTICLE_ID // OUTPUT: A STRING REPRESENTING THE RELATIVE PATH TO THE ARTICLE'S DIRECTORY function article_dir($article_id = 0) { if($article_id == 0 & $this->article_exists) { $article_id = $this->article_info[article_id]; } $subdir = $article_id+999-(($article_id-1)%1000); $articledir = "./uploads_article/$subdir/$article_id/"; return $articledir; } // END article_dir() METHOD // THIS METHOD OUTPUTS THE PATH TO THE ARTICLE'S PHOTO OR THE GIVEN NOPHOTO IMAGE // INPUT: $nophoto_image (OPTIONAL) REPRESENTING THE PATH TO AN IMAGE TO OUTPUT IF NO PHOTO EXISTS // OUTPUT: A STRING CONTAINING THE PATH TO THE ARTICLE'S PHOTO function article_photo($nophoto_image = "") { $article_photo = $this->article_dir($this->article_info[article_id]).$this->article_info[article_photo]; if(!file_exists($article_photo) | $this->article_info[article_photo] == "") { $article_photo = $nophoto_image; } return $article_photo; } // END article_photo() METHOD // THIS METHOD UPLOADS AN ARTICLE PHOTO ACCORDING TO SPECIFICATIONS AND RETURNS ARTICLE PHOTO // INPUT: $photo_name REPRESENTING THE NAME OF THE FILE INPUT // OUTPUT: function article_photo_upload($photo_name) { global $database, $url; // SET KEY VARIABLES $file_maxsize = "4194304"; $file_exts = explode(",", str_replace(" ", "", strtolower($this->articleowner_level_info[level_article_photo_exts]))); $file_types = explode(",", str_replace(" ", "", strtolower("image/jpeg, image/jpg, image/jpe, image/pjpeg, image/pjpg, image/x-jpeg, x-jpg, image/gif, image/x-gif, image/png, image/x-png"))); $file_maxwidth = $this->articleowner_level_info[level_article_photo_width]; $file_maxheight = $this->articleowner_level_info[level_article_photo_height]; $photo_newname = "0_".rand(1000, 9999).".jpg"; $file_dest = $this->article_dir($this->article_info[article_id]).$photo_newname; $new_photo = new se_upload(); $new_photo->new_upload($photo_name, $file_maxsize, $file_exts, $file_types, $file_maxwidth, $file_maxheight); // UPLOAD AND RESIZE PHOTO IF NO ERROR if($new_photo->is_error == 0) { // DELETE OLD AVATAR IF EXISTS $this->article_photo_delete(); // CHECK IF IMAGE RESIZING IS AVAILABLE, OTHERWISE MOVE UPLOADED IMAGE if($new_photo->is_image == 1) { $new_photo->upload_photo($file_dest); } else { $new_photo->upload_file($file_dest); } // UPDATE ARTICLE INFO WITH IMAGE IF STILL NO ERROR if($new_photo->is_error == 0) { $database->database_query("UPDATE se_articles SET article_photo='$photo_newname' WHERE article_id='".$this->article_info[article_id]."'"); $this->article_info[article_photo] = $photo_newname; } } $this->is_error = $new_photo->is_error; $this->error_message = $new_photo->error_message; } // END article_photo_upload() METHOD // THIS METHOD DELETES A ARTICLE PHOTO // INPUT: // OUTPUT: function article_photo_delete() { global $database; $article_photo = $this->article_photo(); if($article_photo != "") { unlink($article_photo); $database->database_query("UPDATE se_articles SET article_photo='' WHERE article_id='".$this->article_info[article_id]."'"); $this->article_info[article_photo] = ""; } } // END article_photo_delete() METHOD // THIS METHOD UPLOADS MEDIA TO A ARTICLE ALBUM // INPUT: $file_name REPRESENTING THE NAME OF THE FILE INPUT // $articlealbum_id REPRESENTING THE ID OF THE ARTICLE ALBUM TO UPLOAD THE MEDIA TO // $space_left REPRESENTING THE AMOUNT OF SPACE LEFT // OUTPUT: function article_media_upload($file_name, $articlealbum_id, &$space_left) { global $class_article, $database, $url; // SET KEY VARIABLES $file_maxsize = $this->articleowner_level_info[level_article_album_maxsize]; $file_exts = explode(",", str_replace(" ", "", strtolower($this->articleowner_level_info[level_article_album_exts]))); $file_types = explode(",", str_replace(" ", "", strtolower($this->articleowner_level_info[level_article_album_mimes]))); $file_maxwidth = $this->articleowner_level_info[level_article_album_width]; $file_maxheight = $this->articleowner_level_info[level_article_album_height]; $new_media = new se_upload(); $new_media->new_upload($file_name, $file_maxsize, $file_exts, $file_types, $file_maxwidth, $file_maxheight); // UPLOAD AND RESIZE PHOTO IF NO ERROR if($new_media->is_error == 0) { // INSERT ROW INTO MEDIA TABLE $database->database_query("INSERT INTO se_articlemedia ( articlemedia_articlealbum_id, articlemedia_date ) VALUES ( '$articlealbum_id', '".time()."' )"); $articlemedia_id = $database->database_insert_id(); // CHECK IF IMAGE RESIZING IS AVAILABLE, OTHERWISE MOVE UPLOADED IMAGE if($new_media->is_image == 1) { $file_dest = $this->article_dir($this->article_info[article_id]).$articlemedia_id.".jpg"; $thumb_dest = $this->article_dir($this->article_info[article_id]).$articlemedia_id."_thumb.jpg"; $new_media->upload_photo($file_dest); $new_media->upload_photo($thumb_dest, 200, 200); $file_ext = "jpg"; $file_filesize = filesize($file_dest); } else { $file_dest = $this->article_dir($this->article_info[article_id]).$articlemedia_id.".".$new_media->file_ext; $new_media->upload_file($file_dest); $file_ext = $new_media->file_ext; $file_filesize = filesize($file_dest); } // CHECK SPACE LEFT if($file_filesize > $space_left) { $new_media->is_error = 1; $new_media->error_message = $class_article[1].$_FILES[$file_name]['name']; } else { $space_left = $space_left-$file_filesize; } // DELETE FROM DATABASE IF ERROR if($new_media->is_error != 0) { $database->database_query("DELETE FROM se_articlemedia WHERE articlemedia_id='$articlemedia_id' AND articlemedia_articlealbum_id='$articlealbum_id'"); @unlink($file_dest); // UPDATE ROW IF NO ERROR } else { $database->database_query("UPDATE se_articlemedia SET articlemedia_ext='$file_ext', articlemedia_filesize='$file_filesize' WHERE articlemedia_id='$articlemedia_id' AND articlemedia_articlealbum_id='$articlealbum_id'"); } } // RETURN FILE STATS $file = Array('is_error' => $new_media->is_error, 'error_message' => $new_media->error_message, 'articlemedia_id' => $articlemedia_id, 'articlemedia_ext' => $file_ext, 'articlemedia_filesize' => $file_filesize); return $file; } // END article_media_upload() METHOD // THIS METHOD RETURNS THE SPACE USED // INPUT: $articlealbum_id (OPTIONAL) REPRESENTING THE ID OF THE ALBUM TO CALCULATE // OUTPUT: AN INTEGER REPRESENTING THE SPACE USED function article_media_space($articlealbum_id = 0) { global $database; // BEGIN QUERY $articlemedia_query = "SELECT sum(se_articlemedia.articlemedia_filesize) AS total_space"; // CONTINUE QUERY $articlemedia_query .= " FROM se_articlealbums LEFT JOIN se_articlemedia ON se_articlealbums.articlealbum_id=se_articlemedia.a rticlemedia_articlealbum_id"; // ADD WHERE IF NECESSARY if($this->article_exists != 0 | $articlealbum_id != 0) { $articlemedia_query .= " WHERE"; } // IF ARTICLE EXISTS, SPECIFY ARTICLE ID if($this->article_exists != 0) { $articlemedia_query .= " se_articlealbums.articlealbum_article_id='".$this->article_info[article_id]."'"; } // ADD AND IF NECESSARY if($this->article_exists != 0 & $articlealbum_id != 0) { $articlemedia_query .= " AND"; } // SPECIFY ALBUM ID IF NECESSARY if($articlealbum_id != 0) { $articlemedia_query .= " se_articlealbums.articlealbum_id='$articlealbum_id '"; } // GET AND RETURN TOTAL SPACE USED $space_info = $database->database_fetch_assoc($database->database_query($articlemedia_query)); return $space_info[total_space]; } // END article_media_space() METHOD // THIS METHOD RETURNS THE NUMBER OF ARTICLE MEDIA // INPUT: $articlealbum_id (OPTIONAL) REPRESENTING THE ID OF THE ARTICLE ALBUM TO CALCULATE // OUTPUT: AN INTEGER REPRESENTING THE NUMBER OF FILES function article_media_total($articlealbum_id = 0) { global $database; // BEGIN QUERY $articlemedia_query = "SELECT count(se_articlemedia.articlemedia_id) AS total_files"; // CONTINUE QUERY $articlemedia_query .= " FROM se_articlealbums LEFT JOIN se_articlemedia ON se_articlealbums.articlealbum_id=se_articlemedia.a rticlemedia_articlealbum_id"; // ADD WHERE IF NECESSARY if($this->article_exists != 0 | $articlealbum_id != 0) { $articlemedia_query .= " WHERE"; } // IF ARTICLE EXISTS, SPECIFY ARTICLE ID if($this->article_exists != 0) { $articlemedia_query .= " se_articlealbums.articlealbum_article_id='".$this->article_info[article_id]."'"; } // ADD AND IF NECESSARY if($this->article_exists != 0 & $articlealbum_id != 0) { $articlemedia_query .= " AND"; } // SPECIFY ALBUM ID IF NECESSARY if($articlealbum_id != 0) { $articlemedia_query .= " se_articlealbums.articlealbum_id='$articlealbum_id '"; } // GET AND RETURN TOTAL FILES $file_info = $database->database_fetch_assoc($database->database_query($articlemedia_query)); return $file_info[total_files]; } // END article_media_total() METHOD // THIS METHOD RETURNS AN ARRAY OF ARTICLE MEDIA // INPUT: $start REPRESENTING THE ARTICLE MEDIA TO START WITH // $limit REPRESENTING THE NUMBER OF ARTICLE MEDIA TO RETURN // $sort_by (OPTIONAL) REPRESENTING THE ORDER BY CLAUSE // $where (OPTIONAL) REPRESENTING ADDITIONAL THINGS TO INCLUDE IN THE WHERE CLAUSE // OUTPUT: AN ARRAY OF ARTICLE MEDIA function article_media_list($start, $limit, $sort_by = "articlemedia_id DESC", $where = "") { global $database; // BEGIN QUERY $articlemedia_query = "SELECT se_articlemedia.*, se_articlealbums.articlealbum_id, se_articlealbums.articlealbum_article_id, se_articlealbums.articlealbum_title, count(se_articlemediacomments.articlemediacomment_ id) AS total_comments"; // CONTINUE QUERY $articlemedia_query .= " FROM se_articlemedia LEFT JOIN se_articlemediacomments ON se_articlemediacomments.articlemediacomment_articl emedia_id=se_articlemedia.articlemedia_id LEFT JOIN se_articlealbums ON se_articlealbums.articlealbum_id=se_articlemedia.a rticlemedia_articlealbum_id"; // ADD WHERE IF NECESSARY if($this->article_exists != 0 | $where != "") { $articlemedia_query .= " WHERE"; } // IF ARTICLE EXISTS, SPECIFY ARTICLE ID if($this->article_exists != 0) { $articlemedia_query .= " se_articlealbums.articlealbum_article_id='".$this->article_info[article_id]."'"; } // ADD AND IF NECESSARY if($this->article_exists != 0 & $where != "") { $articlemedia_query .= " AND"; } // ADD ADDITIONAL WHERE CLAUSE if($where != "") { $articlemedia_query .= " $where"; } // ADD GROUP BY, ORDER, AND LIMIT CLAUSE $articlemedia_query .= " GROUP BY articlemedia_id ORDER BY $sort_by LIMIT $start, $limit"; // RUN QUERY $articlemedia = $database->database_query($articlemedia_query); // GET ARTICLE MEDIA INTO AN ARRAY $articlemedia_array = Array(); while($articlemedia_info = $database->database_fetch_assoc($articlemedia)) { // CREATE ARRAY OF MEDIA DATA $articlemedia_array[] = Array('articlemedia_id' => $articlemedia_info[articlemedia_id], 'articlemedia_articlealbum_id' => $articlemedia_info[articlemedia_articlealbum_id], 'articlemedia_date' => $articlemedia_info[articlemedia_date], 'articlemedia_title' => $articlemedia_info[articlemedia_title], 'articlemedia_desc' => str_replace("
        ", "\r\n", $articlemedia_info[articlemedia_desc]), 'articlemedia_ext' => $articlemedia_info[articlemedia_ext], 'articlemedia_filesize' => $articlemedia_info[articlemedia_filesize], 'articlemedia_comments_total' => $articlemedia_info[total_comments]); } // RETURN ARRAY return $articlemedia_array; } // END article_media_list() METHOD // THIS METHOD UPDATES ARTICLE MEDIA INFORMATION // INPUT: $start REPRESENTING THE ARTICLE MEDIA TO START WITH // $limit REPRESENTING THE NUMBER OF ARTICLE MEDIA TO RETURN // $sort_by (OPTIONAL) REPRESENTING THE ORDER BY CLAUSE // $where (OPTIONAL) REPRESENTING ADDITIONAL THINGS TO INCLUDE IN THE WHERE CLAUSE // OUTPUT: AN ARRAY CONTAINING ALL THE ARTICLE MEDIA ID function article_media_update($start, $limit, $sort_by = "articlemedia_id DESC", $where = "") { global $database; // BEGIN QUERY $articlemedia_query = "SELECT se_articlemedia.*, se_articlealbums.articlealbum_id, se_articlealbums.articlealbum_article_id, se_articlealbums.articlealbum_title, count(se_articlemediacomments.articlemediacomment_ id) AS total_comments"; // CONTINUE QUERY $articlemedia_query .= " FROM se_articlemedia LEFT JOIN se_articlemediacomments ON se_articlemediacomments.articlemediacomment_articl emedia_id=se_articlemedia.articlemedia_id LEFT JOIN se_articlealbums ON se_articlealbums.articlealbum_id=se_articlemedia.a rticlemedia_articlealbum_id"; // ADD WHERE IF NECESSARY if($this->article_exists != 0 | $where != "") { $articlemedia_query .= " WHERE"; } // IF ARTICLE EXISTS, SPECIFY ARTICLE ID if($this->article_exists != 0) { $articlemedia_query .= " se_articlealbums.articlealbum_article_id='".$this->article_info[article_id]."'"; } // ADD AND IF NECESSARY if($this->article_exists != 0 & $where != "") { $articlemedia_query .= " AND"; } // ADD ADDITIONAL WHERE CLAUSE if($where != "") { $articlemedia_query .= " $where"; } // ADD GROUP BY, ORDER, AND LIMIT CLAUSE $articlemedia_query .= " GROUP BY articlemedia_id ORDER BY $sort_by LIMIT $start, $limit"; // RUN QUERY $articlemedia = $database->database_query($articlemedia_query); // GET ARTICLE MEDIA INTO AN ARRAY $articlemedia_array = Array(); while($articlemedia_info = $database->database_fetch_assoc($articlemedia)) { $var1 = "articlemedia_title_".$articlemedia_info[articlemedia_id]; $var2 = "articlemedia_desc_".$articlemedia_info[articlemedia_id]; $articlemedia_title = censor($_POST[$var1]); $articlemedia_desc = censor(str_replace("\r\n", "
        ", $_POST[$var2])); if($articlemedia_title != $articlemedia_info[articlemedia_title] OR $articlemedia_desc != $articlemedia_info[articlemedia_desc]) { $database->database_query("UPDATE se_articlemedia SET articlemedia_title='$articlemedia_title', articlemedia_desc='$articlemedia_desc' WHERE articlemedia_id='$articlemedia_info[articlemedia_id]'"); } $articlemedia_array[] = $articlemedia_info[articlemedia_id]; } return $articlemedia_array; } // END article_media_update() METHOD // THIS METHOD DELETES SELECTED ARTICLE MEDIA // INPUT: $start REPRESENTING THE ARTICLE MEDIA TO START WITH // $limit REPRESENTING THE NUMBER OF ARTICLE MEDIA TO RETURN // $sort_by (OPTIONAL) REPRESENTING THE ORDER BY CLAUSE // $where (OPTIONAL) REPRESENTING ADDITIONAL THINGS TO INCLUDE IN THE WHERE CLAUSE // OUTPUT: function article_media_delete($start, $limit, $sort_by = "articlemedia_id DESC", $where = "") { global $database, $url; // BEGIN QUERY $articlemedia_query = "SELECT se_articlemedia.*, se_articlealbums.articlealbum_id, se_articlealbums.articlealbum_article_id, se_articlealbums.articlealbum_title, count(se_articlemediacomments.articlemediacomment_ id) AS total_comments"; // CONTINUE QUERY $articlemedia_query .= " FROM se_articlemedia LEFT JOIN se_articlemediacomments ON se_articlemediacomments.articlemediacomment_articl emedia_id=se_articlemedia.articlemedia_id LEFT JOIN se_articlealbums ON se_articlealbums.articlealbum_id=se_articlemedia.a rticlemedia_articlealbum_id"; // ADD WHERE IF NECESSARY if($this->article_exists != 0 | $where != "") { $articlemedia_query .= " WHERE"; } // IF ARTICLE EXISTS, SPECIFY ARTICLE ID if($this->article_exists != 0) { $articlemedia_query .= " se_articlealbums.articlealbum_article_id='".$this->article_info[article_id]."'"; } // ADD AND IF NECESSARY if($this->article_exists != 0 & $where != "") { $articlemedia_query .= " AND"; } // ADD ADDITIONAL WHERE CLAUSE if($where != "") { $articlemedia_query .= " $where"; } // ADD GROUP BY, ORDER, AND LIMIT CLAUSE $articlemedia_query .= " GROUP BY articlemedia_id ORDER BY $sort_by LIMIT $start, $limit"; // RUN QUERY $articlemedia = $database->database_query($articlemedia_query); // LOOP OVER ARTICLE MEDIA $articlemedia_delete = ""; while($articlemedia_info = $database->database_fetch_assoc($articlemedia)) { $var = "delete_articlemedia_".$articlemedia_info[articlemedia_id]; if($_POST[$var] == 1) { if($articlemedia_delete != "") { $articlemedia_delete .= " OR "; } $articlemedia_delete .= "articlemedia_id='$articlemedia_info[articlemedia_id]'"; $articlemedia_path = $this->article_dir($this->article_info[article_id]).$articlemedia_info[articlemedia_id].".".$articlemedia_info[articlemedia_ext]; if(file_exists($articlemedia_path)) { unlink($articlemedia_path); } $thumb_path = $this->article_dir($this->article_info[article_id]).$articlemedia_info[articlemedia_id]."_thumb.".$articlemedia_info[articlemedia_ext]; if(file_exists($thumb_path)) { unlink($thumb_path); } } } // IF DELETE CLAUSE IS NOT EMPTY, DELETE ARTICLE MEDIA if($articlemedia_delete != "") { $database->database_query("DELETE FROM se_articlemedia, se_articlemediacomments USING se_articlemedia LEFT JOIN se_articlemediacomments ON se_articlemedia.articlemedia_id=se_articlemediacom ments.articlemediacomment_articlemedia_id WHERE ($articlemedia_delete)"); } } // END article_media_delete() METHOD function is_article_active() { return !($this->article_info[article_approved] == 0 || $this->article_info[article_draft] == 1); } function generate_slug($text, $options=array()) { if (!isset($options['case'])) { $text = strtolower($text); } $space = $options['space'] ? $options['space'] : '-'; // strip all non word chars $text = preg_replace('/\W/', ' ', $text); // replace all white space sections with a dash $text = preg_replace('/\ +/', $space, $text); // trim dashes $text = preg_replace('/\-$/', '', $text); $text = preg_replace('/^\-/', '', $text); return $text; } } class rc_articletag extends rc_tag { var $table = 'se_articletags'; } Fatal error: Class 'rc_article' not found in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\include\functions_arti cle.php on line 42

        Comment


          #5
          <?php
          place your file here
          ?>
          Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
          Visit: WapMasterz Coming Back Soon!
          _______
          SCRIPTS FOR SALE BY SUBZERO
          Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
          FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
          _______
          Info & Tips
          php.net
          w3schools.com

          Comment


            #6
            i do not undertsand what that means plcae file here

            Comment


              #7
              found it can be a error in my php 5

              Comment


                #8
                yes u need php 5 for it

                Comment


                  #9
                  {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl {\f0\fnil\fcharset0 MS Shell Dlg;}{\f1\fswiss\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;} {\*\generator Msftedit 5.41.21.2500;}\viewkind4\uc1\pard\cf1\lang2057\f0\ fs20
                  PHP Logo
                  PHP Version 5.2.10

                  that error that comes up abvoe my php info, how do i fix that

                  Comment

                  Working...
                  X