
<?php

require_once($_SERVER['DOCUMENT_ROOT'] . '/sys/db.php');

$dal = new DAL();


$sql = "INSERT INTO controlinstance (controlobject_id, instance, location) " . 
        "VALUES (38, 'sumContactDefinitions', 'contactdefinition') " ;
$ci_id = $dal->query($sql);
  
    
$sql = "INSERT INTO controlentry (controlinstance_id, property, value) " . 
        "VALUES ($ci_id, 'scope', 'sumContactDefinitions') " ;
$ce_id = $dal->query($sql);
    
    
$sql = "INSERT INTO controlentry (controlinstance_id, property, value) " . 
        "VALUES ($ci_id, 'listeners', 'putContactDefinition') " ;
$ce_id = $dal->query($sql);
    
    
$sql = "INSERT INTO controlentry (controlinstance_id, property, value) " . 
        "VALUES ($ci_id, 'summary', '\$contactDefinition->get(\'instance_sum\')') " ;
$ce_id = $dal->query($sql);
    
    
$sql = "INSERT INTO controlentry (controlinstance_id, property, value) " . 
        "VALUES ($ci_id, 'iterator', 'putContactDefinition') " ;
$ce_id = $dal->query($sql);
    
    
$sql = "INSERT INTO controlentry (controlinstance_id, property, value) " . 
        "VALUES ($ci_id, 'summaryId', '0') " ;
$ce_id = $dal->query($sql);
    
    
$sql = "INSERT INTO controlentry (controlinstance_id, property, value) " . 
        "VALUES ($ci_id, 'selectId', '0') " ;
$ce_id = $dal->query($sql);
    
    
$sql = "INSERT INTO controlentry (controlinstance_id, property, value) " . 
        "VALUES ($ci_id, 'formDefs', '\$contactDefinition->get(\'instance_defs\')') " ;
$ce_id = $dal->query($sql);
    
?>
