Exemplo n.º 1
0
 function createProject($type = 0)
 {
     connect_db();
     // create and add the project to the db
     $obj = new Project($type);
     insert_object('Project', $obj);
     // Add the project to the array
     $this->projects[] = $obj->uid;
     update_object('Director', $this);
     //close_db();
     return $obj;
 }
Exemplo n.º 2
0
					<input
						type='submit' 
						name='submit' 
						value='Add Object'
					>
				</div>
			</form>
		</div><?php 
} else {
    $f = array();
    // objects
    foreach ($vars as $var) {
        $f[$var] = addslashes($rr->{$var});
    }
    $siblings = $oo->children_ids($uu->id);
    $toid = insert_object($f, $siblings);
    if ($toid) {
        // wires
        $ww->create_wire($uu->id, $toid);
        ?>
<div>Record added successfully.</div><?php 
    } else {
        ?>
<div>Record not created, please <a href="<?php 
        echo $js_back;
        ?>
">try again.</a></div><?php 
    }
}
?>
</div>