Ejemplo n.º 1
0
 function getResourcesType($type_id = 0)
 {
     $type_id = intval($type_id);
     //if this is the first time calling this function, grab the list from db
     if (empty($resource_types)) {
         include_once TR_INCLUDE_PATH . 'classes/DAO/ResourceTypesDAO.class.php';
         $resourceTypesDAO = new ResourceTypesDAO();
         $rows = $resourceTypesDAO->getAll();
         if (is_array($rows)) {
             foreach ($rows as $row) {
                 $this->resource_types[$row['type_id']] = $row['type'];
             }
         }
     }
     if (!empty($this->resource_types[$type_id])) {
         return $this->resource_types[$type_id];
     }
     return $this->resource_types;
 }
Ejemplo n.º 2
0
if ($_POST['formatting'] != 1) {
    $msg->addFeedback('NO_A4A_FOR_PLAIN_TEXT');
    $msg->printAll();
} else {
    global $db, $content_row, $stripslashes;
    populate_a4a($cid, $stripslashes($_POST['body_text']), $_POST['formatting']);
    include_once TR_INCLUDE_PATH . 'classes/A4a/A4a.class.php';
    $a4a = new A4a($cid);
    $primary_resources = $a4a->getPrimaryResources();
    if (count($primary_resources) == 0) {
        $msg->addFeedback('NO_RESOURCES');
        $msg->printAll();
    } else {
        $is_post_indicator_set = false;
        // get all resource types
        $resource_types = $resourceTypesDAO->getAll();
        echo '<br /><table class="data" rules="all">' . "\n";
        echo '  <thead>' . "\n";
        echo '  <tr>' . "\n";
        echo '    <th rowspan="2" id="header1">' . _AT('original_resource') . '</th>' . "\n";
        echo '    <th rowspan="2" id="header2">' . _AT('resource_type') . '</th>' . "\n";
        echo '    <th colspan="4">' . _AT('alternatives') . '</th>' . "\n";
        echo '  </tr>' . "\n";
        echo '  <tr>' . "\n";
        echo '    <th id="header3">' . _AT('text') . '</th>' . "\n";
        echo '    <th id="header4">' . _AT('audio') . '</th>' . "\n";
        echo '    <th id="header5">' . _AT('visual') . '</th>' . "\n";
        echo '    <th id="header6">' . _AT('sign_lang') . '</th>' . "\n";
        echo '  </tr>' . "\n";
        echo '  </thead>' . "\n";
        echo '  <tbody>';