示例#1
0
 function artist_taxonomies($taxonomies)
 {
     $singular = 'Artist';
     $plural = 'Artists';
     $taxonomies[] = array('post_type' => 'download', 'name' => 'download_artist', 'show_admin_column' => true, 'configuration' => array('hierarchical' => false, 'labels' => get_labels($singular, $plural), 'hide_meta_box' => false, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'artists'), 'capabilities' => array('manage_terms' => 'manage_product_terms', 'edit_terms' => 'edit_product_terms', 'assign_terms' => 'assign_product_terms', 'delete_terms' => 'delete_product_terms')));
     return $taxonomies;
 }
示例#2
0
 function _process($data = array())
 {
     $labels = get_labels();
     foreach ($labels as $url => $label) {
         $data['labels'][] = array('label' => $label, 'url' => $url);
     }
     // don't forget to store to widget_data property
     $this->widget_data = $data;
 }
function create_client_stories_post_type () {
    register_post_type("client-stories", array (
        "labels" => get_labels("Client Story", "Client Stories"),
        "menu_icon" => "dashicons-awards",
        "capability_type" => "post",
        "supports" => array (
            "title"
        ),
        "public" => true,
        "show_in_admin_bar"   => false,
        "show_in_nav_menus"   => false,
        "exclude_from_search" => true,
        "has_archive" => true,
        "rewrite" => array (
            "slug" => "transforms"
        )
    ));
}
function create_team_members_post_type () {
    register_post_type("team-members", array (
        "labels" => get_labels("Team Member", "Team Members"),
        "menu_icon" => "dashicons-groups",
        "capability_type" => "post",
        "supports" => array (
            "title"
        ),
        "public" => true,
        "show_in_admin_bar"   => false,
        "show_in_nav_menus"   => false,
        "exclude_from_search" => true,
        "has_archive" => true,
        "rewrite" => array (
            "slug" => "our-team"
        )
    ));
}
function create_testimonials_post_type () {
    register_post_type("testimonials", array (
        "labels" => get_labels("Testimonial", "Testimonials"),
        "menu_icon" => "dashicons-awards",
        "capability_type" => "post",
        "supports" => array (
            "title",
            "thumbnail"
        ),
        "public" => true,
        "show_in_admin_bar"   => false,
        "show_in_nav_menus"   => false,
        "exclude_from_search" => true,
        "has_archive" => true,
        "rewrite" => array (
            "slug" => "client-testimonials"
        )
    ));
}
示例#6
0
function create_books_post_type () {
    register_post_type("books", array (
        "labels" => get_labels("Book", "Books"),
        "menu_icon" => "dashicons-book",
        "capability_type" => "post",
        "supports" => array (
            "title",
            "thumbnail"
        ),
        "public" => true,
        "show_in_admin_bar"   => false,
        "show_in_nav_menus"   => false,
        "exclude_from_search" => true,
        "has_archive" => true,
        "rewrite" => array (
            "slug" => "bookstore"
        )
    ));
}
function create_community_stories_post_type () {
    register_post_type("community-stories", array (
        "labels" => get_labels("Community Story", "Community Stories"),
        "menu_icon" => "dashicons-smiley",
        "capability_type" => "post",
        "supports" => array (
            "title",
            "thumbnail"
        ),
        "public" => true,
        "show_in_admin_bar"   => false,
        "show_in_nav_menus"   => false,
        "exclude_from_search" => true,
        "has_archive" => true,
        "rewrite" => array (
            "slug" => "community-stories"
        )
    ));
}
function create_job_postings_post_type () {
    register_post_type("job-postings", array (
        "labels" => get_labels("Job Posting", "Job Postings"),
        "menu_icon" => "dashicons-businessman",
        "capability_type" => "post",
        "supports" => array (
            "title",
            "editor",
            "thumbnail"
        ),
        "public" => true,
        "show_in_admin_bar"   => false,
        "show_in_nav_menus"   => false,
        "exclude_from_search" => true,
        "has_archive" => true,
        "rewrite" => array (
            "slug" => "join-us"
        )
    ));
}
function check_invalid_results($element)
{
    $acode = $element->activitycode;
    $jobid = $element->jobid;
    $labels = get_labels($acode, $jobid);
    //layout es un array de preguntas
    $layout = get_layout($acode);
    array_pop($layout);
    foreach ($layout as $numberofquestion) {
        $idqs = select_question($labels, $numberofquestion, $acode);
        $defaults = get_question_values($idqs, $acode, $jobid);
        if ($defaults !== null) {
            $sum = array_sum($defaults);
            //print('Suma :'.$sum);
            if ($sum > 1) {
                foreach ($idqs as $key => $params) {
                    if ($params->questiontype == 'CIRCLE') {
                        print 'actualizo ' . $params->label;
                        set_field($table = 'blended_results', $field = 'invalid', $value = 1, $field2 = 'activitycode', $value2 = $acode, $field3 = 'jobid', $value3 = $jobid, $field4 = 'label', $value4 = $params->label);
                        set_field($table = 'blended_results', $field = 'value', $value = 0, $field2 = 'activitycode', $value2 = $acode, $field3 = 'jobid', $value3 = $jobid, $field4 = 'label', $value4 = $params->label);
                    }
                }
            }
        }
    }
    return;
}
示例#10
0
function get_eval_value($acode, $jobid)
{
    $defarray = array();
    $labels = get_labels($acode, $jobid);
    $numberofeval = find_numberofeval($labels);
    if (($evalregs = get_records($table = 'blended_results', $f2 = 'jobid', $v2 = $jobid)) !== false) {
        foreach ($evalregs as $evalreg) {
            if ($evalreg->activitycode == $acode) {
                if ($evalreg->page == 1) {
                    for ($i = 0; $i < $numberofeval; $i++) {
                        $labelvalue = 'EVAL-' . $i;
                        if ($evalreg->label == $labelvalue) {
                            //print_object($evalreg);
                            if ($evalreg->value == 1) {
                                $evallabel = $evalreg->label;
                                $defarray = explode('-', $evallabel);
                                //print ("llego y label =");
                                //print $evallabel;
                                //print_object($defarray);
                            }
                        }
                    }
                }
            }
        }
    }
    if (isset($defarray[1])) {
        $defaulteval = $defarray[1];
    } else {
        $defaulteval = 0;
    }
    return $defaulteval;
}
示例#11
0
        echo "</tr>\n";
    }
}
?>
</tbody>
</table>

<br />
  <?php 
echo "<table border=\"0\" style=\"padding-left:10px; padding-right:2px; padding-bottom:5px; width:100%; color:#1E3287\"><tr><td>" . $string['summary'] . "</td><td style=\"width:98%\"><hr noshade=\"noshade\" style=\"border:0px; height:1px; color:#E5E5E5; background-color:#E5E5E5; width:100%\" /></td></tr></table>\n";
echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"line-height:150%\">\n";
echo "<tr><td align=\"right\" style=\"width:110px\">" . $string['cohortsize'] . "</td><td style=\"text-align:right; width:40px\">" . $user_no . "</td></tr>\n";
if ($borderline_method) {
    echo "<tr><td align=\"right\">" . $string['passmark'] . "</td><td style=\"text-align:right\">" . round($passmark, 2) . "</td><td>% (" . $string['borderlinemethod'] . ")</td></tr>\n";
} elseif ($propertyObj->get_pass_mark() != 102) {
    // Not the N/A option
    echo "<tr><td align=\"right\">" . $string['passmark'] . "</td><td style=\"text-align:right\">" . $propertyObj->get_pass_mark() . "</td><td>%</td></tr>\n";
}
$labels = get_labels($propertyObj);
foreach ($labels as $i => $label) {
    echo "<tr><td align=\"right\">" . $string[strtolower($label)] . "</td><td style=\"text-align:right\">" . $classifications[$i] . "</td></tr>\n";
}
echo "</table>\n";
$mysqli->close();
?>
<input type="hidden" id="userID" value="" />
<input type="hidden" id="metadataID" value="" />
</div>
</body>
</html>
示例#12
0
        echo 'class="active"';
    }
    ?>
><a href="sn_profile.php?db_name=tcmls" >相关文献</a></li>   
                    <li <?php 
    if ($tab == 'related') {
        echo 'class="active"';
    }
    ?>
><a href="sn_profile.php?db_name=tcmct" >引文</a></li>   

                </ul>-->
                <div class="container">

                    <?php 
    $labels = get_labels($dbc, $db_name, $file_id, $row['title']);
    if (count($labels) != 0) {
        echo '<p><font color="silver">别名: ' . implode(', ', $labels) . '</font></p>';
    }
    echo '<br>';
    echo '<div class="well">';
    echo '<p class="lead">简介</p>';
    echo '<p>' . $row['description'] . '</p>';
    echo '</div>';
    echo '<br> ';
    ?>

                    <ul class = "nav nav-tabs">
                        <li class="active"><a href = "#basic" data-toggle = "tab">文献基本信息</a></li>
                        <li><a href = "#metadata" data-toggle = "tab">文献详细元数据</a></li>                   
                    </ul>
示例#13
0
function get_responses($acode, $jobid, $attempt)
{
    $responses = new stdClass();
    $layout = get_layout($acode);
    array_pop($layout);
    $labels = get_labels($acode, $jobid);
    foreach ($layout as $numberofquestion) {
        $idqs = select_question($labels, $numberofquestion, $acode);
        $answers = get_question_values($idqs, $acode, $jobid);
        //print_object ($answers);
        if ($answers !== null) {
            foreach ($answers as $key => $answer) {
                if ($answer == true) {
                    //print ($key.'=>'.$answer);
                    //print "<BR>";
                    $keyarray = explode('-', $key);
                    $qid = $numberofquestion;
                    $qanswer = $keyarray[1];
                    $qlabel = 'resp' . $qid . '_' . $qanswer;
                    $responses->{$qlabel} = $qanswer;
                }
            }
        }
    }
    $responses->finishattempt = 'Enviar todo y terminar';
    $responses->timeup = 0;
    $questionids = get_questionids($acode);
    $responses->questionids = $questionids;
    return $responses;
}
示例#14
0
文件: index.php 项目: joksnet/php-old
                    $ins = new Insert('posts2labels', $db);
                    $ins->col['id_posts'] = $id_posts;
                    $ins->col['id_labels'] = $value;
                    $ins->update();
                }
                redirect('?rand=' . rand() . '&amp;rss=true');
            }
            $page_title = ($action == 'editpost' || $action == 'editpage' ? 'Edit ' : 'Write ') . ($action == 'writepage' || $action == 'editpage' ? 'Page' : 'Post');
            $head = '
<style type="text/css">
    label {
        width: 70px;
    }
</style>
';
            $labels = get_labels(isset($_GET['id_posts']) && is_numeric($_GET['id_posts']) && $_GET['id_posts'] > 0 ? $_GET['id_posts'] : 0);
            $content = '
        There no validation. So you can include all tags you want. Use it at your own risk.
        <!-- 03.05.2006 - Now you can __not__ add HTML code, then you have a <a href="#">Freak Code</a> (all RegEx). HTML entities will be ignored, type the f*****g character. -->
        <form name="frm" id="frm" action="' . ($action == 'editpost' || $action == 'editpage' ? '?action=' . $action . '&amp;id_posts=' . $_GET['id_posts'] : '') . '" method="post">
            <label for="title">Title</label><input type="text" name="title" id="title" size="50"' . ($action == 'editpost' || $action == 'editpage' ? ' value="' . $value['title'] . '"' : '') . ' /><br />
            <label for="description">Content</label>
                <textarea name="description" id="description" cols="48" rows="12"></textarea>
                <div id="preview" style="float: left; width: 363px; margin-top: 1px; padding: 3px; background-color: #f4f4f4; border: 1px solid #b2b2b2; display: none;"></div>
            <br />
            <label for="add_labels">Labels</label><select name="add_labels" id="add_labels" style="margin-top: 2px;" onchange="manageLabels();">' . $options . '</select><div id="labels" style="padding-top: 7px;"></div><br />
            ' . ($action == 'editpost' || $action == 'editpage' ? '<div align="center"><a href="javascript:post();">save</a>&nbsp;' . ($value['active'] == 'draft' ? '<a href="javascript:publish();">publish</a>&nbsp;' : '') . '<a id="preview_link" href="javascript:preview();">preview</a>&nbsp;<a href="?action=manageposts">back</a></div>' : '<div align="center"><a href="javascript:post();">write</a>&nbsp;<a href="javascript:draft();">draft</a>&nbsp;<a id="preview_link" href="javascript:preview();">preview</a>&nbsp;<a href="?rand=' . rand() . '">back</a></div>') . '
        </form>
<script language="javascript" type="text/javascript">
<!--
    function createHiddenInput( name, value )