コード例 #1
0
ファイル: external.php プロジェクト: CivicCommons/oldBellCaPA
                break;
        }
    }
}
$serviceCount = PersonaService::count_persona_services();
$enabledServiceCount = PersonaService::count_persona_services_enabled();
$personaCount = Persona::count_user_personas($user->user_id);
?>
<h1>External Accounts - WORK IN PROGRESS</h1>

      <form enctype="multipart/form-data" action="edit_profile.php?type=external" method="post">
      <input type="hidden" name="profile_type" value="external" />
    <fieldset style="margin: 5px 30px 20px 30px; width: auto;">              
      <div id="available-info">
        <?php 
$services =& PersonaService::load_persona_services();
echo '<h2>Available Services (' . $enabledServiceCount . ')</h2>';
for ($i = 0; $i < $serviceCount; $i++) {
    $service = $services[$i];
    if ($service->enabled) {
        echo '<fieldset class="center_box ext_service">';
        // echo '<legend>' . $service->name . '</legend>';
        echo '<div class="ext_service_image">';
        build_service_img($service->symbol, 'small');
        echo '</div>';
        echo '<div class="available-buttonbar">';
        echo '<ul>';
        // setup the needed data
        $c = NULL;
        $c->{'service'} = $service->symbol;
        $c->{'persona_service_id'} = $service->persona_service_id;
コード例 #2
0
 public function load_persona_services()
 {
     Logger::log("Enter: function PersonaService::load_persona_services");
     $sql = "SELECT * FROM {persona_services} ORDER BY sequence";
     $data = array();
     $res = Dal::query($sql, $data);
     $results = array();
     $i = 0;
     while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) {
         $obj = new PersonaService();
         $obj->load_from_row($row);
         $results[$i] = $obj;
         $i++;
     }
     Logger::log("Exit: function PersonaService::load_persona_services");
     return $results;
 }