Пример #1
0
function openmeetings_add_instance($openmeetings)
{
    global $USER, $CFG;
    $openmeetings_gateway = new openmeetings_gateway();
    if ($openmeetings_gateway->openmeetings_loginuser()) {
        $openmeetings->room_id = $openmeetings_gateway->openmeetings_createroomwithmod($openmeetings);
    } else {
        echo "Could not login User to OpenMeetings, check your OpenMeetings Module Configuration";
        exit;
    }
    # May have to add extra stuff in here #
    return insert_record("openmeetings", $openmeetings);
}
 function createMyRoomWithMod()
 {
     global $sugar_config;
     global $current_user;
     $openmeetings_gateway = new openmeetings_gateway();
     if ($openmeetings_gateway->openmeetings_loginuser()) {
         /*	'name' => 'SUGARCM_ROOM',
         			'roomtypes_id' => 1,
         			'comment' => 'Created by SOAP-Gateway for SUGARCM Platform',
         			'numberOfPartizipants' => 100,
         			'ispublic' => false,
         			'appointment' => false, 
         			'isDemoRoom' => false, 
         			'demoTime' => 0, 
         			'isModeratedRoom' => $isModeratedRoom
         		*/
         $openmeetings->name = "SUGARCRM_MY_ROOM_" . $current_user->id;
         $openmeetings->roomtypes_id = 1;
         $openmeetings->comment = 'Created by SOAP-Gateway for SUGARCM Platform';
         $openmeetings->numberOfPartizipants = 100;
         $openmeetings->ispublic = false;
         $openmeetings->appointment = false;
         $openmeetings->isDemoRoom = false;
         $openmeetings->demoTime = 0;
         $openmeetings->isModeratedRoom = true;
         $roomid = $openmeetings_gateway->openmeetings_createroomwithmod($openmeetings);
         return $roomid;
     } else {
         echo "Could not login User to OpenMeetings, check your OpenMeetings Module Configuration";
         //exit();
     }
 }