public function get_record_count($set_id, $datefrom = false, $dateuntil = false)
 {
     if (!isset($this->total_record_count[$set_id])) {
         $co_set = new_connector_out_set_typed($set_id);
         $co_set->update_if_expired();
         $this->total_record_count[$set_id] = $co_set->get_value_count($datefrom, $dateuntil);
     }
     return $this->total_record_count[$set_id];
 }
 function connector_out_sets()
 {
     global $dbh;
     $sql = "SELECT connector_out_set_id, connector_out_set_type FROM connectors_out_sets ORDER BY connector_out_set_type";
     $res = pmb_mysql_query($sql, $dbh);
     while ($row = pmb_mysql_fetch_assoc($res)) {
         $aesuser = new_connector_out_set_typed($row["connector_out_set_id"], $row["connector_out_set_type"]);
         $this->sets[] = clone $aesuser;
     }
 }
function update_set_from_form()
{
    global $msg, $charset, $dbh, $id;
    global $set_type, $set_caption;
    if (!$id) {
        //Ajout d'un nouveau set
        if (!$set_caption) {
            print $msg['admin_connecteurs_set_emptyfield'];
            show_set_form(0, stripslashes($set_type), stripslashes($set_caption));
            return false;
        }
        if (connector_out_set::caption_exists($set_caption)) {
            print $msg['admin_connecteurs_set_namealreadyexists'];
            show_set_form(0, stripslashes($set_type), stripslashes($set_caption));
            return false;
        }
        $new_set = connector_out_set::add_new();
        $new_set->type = $set_type;
        $new_set->caption = stripslashes($set_caption);
        $new_set->commit_to_db();
    } else {
        $theset = new_connector_out_set_typed($id);
        if ($theset->error) {
            return false;
        }
        $theset->type = $set_type;
        $theset->caption = stripslashes($set_caption);
        $theset->update_config_from_form();
        $theset->cache->update_from_form();
        $theset->commit_to_db();
        $theset->cache->commit_to_db();
    }
    return true;
}