Beispiel #1
0
 protected function __construct($name, $safeLink, $javascript, $icon = null, $hideText = false)
 {
     if ($icon === null) {
         $icon = $name;
     }
     $this->name = htmlize($name);
     $this->link = ' href="' . $safeLink . '"';
     if ($javascript == null) {
         $this->javascript = '';
     } else {
         $this->javascript = ' onclick="' . $javascript . '"';
     }
     $this->hideText = $hideText;
     $this->iconName = strtolower($icon);
     $this->icon = 'images/buttons/' . str_replace(' ', '_', strtolower($icon)) . '.png';
     if (!file_exists($this->icon) && !file_exists('../' . $this->icon)) {
         $this->icon = null;
     }
     require_css('button');
 }
Beispiel #2
0
 public function getName()
 {
     return htmlize($this->city . ', ' . $this->getStateAbbreviation());
 }
Beispiel #3
0
    if (!empty($recommended)) {
        $recommended_query = "AND referrals.id NOT IN (" . $recommended . ") ";
    }
    $query = "SELECT CONCAT(members.lastname,', ', members.firstname) AS referrer, \n             CONCAT(referees.lastname,', ', referees.firstname) AS candidate,\n             DATE_FORMAT(referrals.member_confirmed_on, '%e %b, %Y') AS formatted_referred_on, \n             DATE_FORMAT(referrals.referee_acknowledged_on, '%e %b, %Y') AS formatted_acknowledged_on, \n             DATE_FORMAT(referrals.employed_on, '%e %b, %Y') AS formatted_employed_on, \n             DATE_FORMAT(referrals.employer_rejected_on, '%e %b, %Y') AS formatted_employer_rejected_on, \n             referrals.resume, referrals.id, referrals.testimony, referrals.shortlisted_on, referrals.used_suggested,\n             referrals.employer_agreed_terms_on, members.email_addr AS referrer_email_addr, \n             referees.email_addr AS candidate_email_addr, members.phone_num AS referrer_phone_num, \n             referees.phone_num AS candidate_phone_num \n             FROM referrals \n             LEFT JOIN members ON members.email_addr = referrals.member \n             LEFT JOIN members AS referees ON referees.email_addr = referrals.referee \n             LEFT JOIN resumes ON resumes.id = referrals.resume \n             WHERE referrals.job = " . $_POST['id'] . " AND " . $filter_by . " \n             need_approval = 'N' AND \n             (resumes.deleted = 'N' AND resumes.private = 'N') AND \n             (referrals.referee_acknowledged_on IS NOT NULL AND referrals.referee_acknowledged_on <> '0000-00-00 00:00:00') AND \n             (referrals.member_confirmed_on IS NOT NULL AND referrals.member_confirmed_on <> '0000-00-00 00:00:00') AND \n             -- (referrals.employed_on IS NULL OR referrals.employed_on = '0000-00-00 00:00:00') AND \n             referrals.employer_removed_on IS NULL AND \n             (referrals.replacement_authorized_on IS NULL OR referrals.replacement_authorized_on = '0000-00-00 00:00:00') " . $recommended_query . " \n             ORDER BY " . $order_by;
    $mysqli = Database::connect();
    $result = $mysqli->query($query);
    if (count($result) <= 0 || is_null($result)) {
        echo "0";
        exit;
    }
    if (!$result) {
        echo "ko";
        exit;
    }
    foreach ($result as $i => $row) {
        $result[$i]['testimony'] = htmlize(desanitize($row['testimony']));
        if (is_null($row['employer_agreed_terms_on']) || $row['employer_agreed_terms_on'] == '0000-00-00 00:00:00') {
            $result[$i]['employer_agreed_terms_on'] = '-1';
        }
    }
    $response = array('referrals' => array('referral' => $result));
    header('Content-type: text/xml');
    echo $xml_dom->get_xml_from_array($response);
    exit;
}
if ($_POST['action'] == 'get_suggested_candidates') {
    $result = get_suggested_candidates($_POST['id']);
    if (count($result) <= 0 || is_null($result)) {
        echo "0";
        exit;
    }
/**
 * send person an invitation with singleuse loginstring per email 
 * 
 * @param int $id          
 */
function churchdb_invitePersonToSystem($id)
{
    global $base_url;
    $loginstr = churchcore_createOnTimeLoginKey($id);
    $content = "<h3>Hallo [Vorname],</h3><P>";
    $content .= htmlize(readConf('invite_email_text', "invitation.email.standard.text", readConf('site_name', 'ChurchTools')));
    $content .= '<p><a href="' . $base_url . "?q=profile&loginstr={$loginstr}&id={$id}" . '" class="btn btn-royal">Auf %sitename anmelden</a>';
    $res = churchcore_sendEMailToPersonIds($id, "Einladung zu " . readConf('site_name', 'ChurchTools'), $content, readConf('site_mail'), true);
    cdb_log("Person {$id} wurde zu " . readConf('site_name', 'ChurchTools') . " eingeladen:" . $content, 2, $id);
}
Beispiel #5
0
 public function getCode()
 {
     return $this->code ? htmlize($this->code) : '(None)';
 }
Beispiel #6
0
 public function getAnswerFormTime()
 {
     return $this->answerTime == null ? null : htmlize(id(new Date($this->answerTime))->toFormTime());
 }
/**
 * send person an invitation with singleuse loginstring per email
 *
 * @param int $id
 */
function churchdb_invitePersonToSystem($id)
{
    global $base_url;
    $loginstr = churchcore_createOnTimeLoginKey($id);
    $content = "<h3>Hallo [Vorname],</h3><P>";
    $content .= htmlize(getConf('invite_email_text', "invitation.email.standard.text", getConf('site_name')));
    $content .= '<p><a href="' . $base_url . "?q=profile&loginstr={$loginstr}&id={$id}" . '" class="btn btn-royal">Auf %sitename anmelden</a>';
    $res = churchcore_sendEMailToPersonIDs($id, "Einladung zu " . getConf('site_name'), $content, getConf('site_mail'), true);
    cdb_log("Person {$id} wurde zu " . getConf('site_name') . " eingeladen:" . $content, 2, $id);
    //TODO: is $content in log really needed? no name; if admin clicks link, ontimelogin will be deleted, ...
}
Beispiel #8
0
 public function getName()
 {
     return htmlize($this->name);
 }
Beispiel #9
0
 public function getPhoneNumber()
 {
     return htmlize($this->phoneNumber);
 }
/**
 * Wraps a name in a box
 *
 * @param raw-str $name
 * @return html-str
 */
function say_hello($name)
{
    return "<div class=\"box\">Hello " . htmlize($name) . "</div>";
}
Beispiel #11
0
        if (current_user_is_allowed_to_send_message_to_user($userIdViewed)) {
            $out .= '<p><a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . '/messaging/sendmessage.php?cmd=rqMessageToUser&userId=' . $userIdViewed)) . '">' . get_lang('Send a message') . '</a></p>';
        }
        $out .= '<hr noshade="noshade" size="1" />' . "\n";
    }
    if ($allowedToEditDef) {
        $out .= "\n\n" . '<div align="right">' . "\n" . '<form method="post" action="' . claro_htmlspecialchars($_SERVER['PHP_SELF'] . '?uInfo=' . $userIdViewed) . '">' . "\n" . claro_form_relay_context() . get_lang('Course administrator only') . ' : ' . '<input type="submit" name="viewDefList" value="' . get_lang('Define Headings') . '" />' . "\n" . '</form>' . "\n" . '<hr noshade="noshade" size="1" />' . "\n" . '</div>';
    }
    $catList = claro_user_info_get_course_user_info($userIdViewed);
    if ($catList) {
        foreach ($catList as $thisCat) {
            // Category title
            $out .= '<p>' . "\n" . '<b>' . $thisCat['title'] . '</b>' . "\n" . '</p>' . "\n" . '<blockquote>' . "\n";
            // Category content
            if ($thisCat['content']) {
                $out .= htmlize($thisCat['content']) . "\n";
            } else {
                $out .= '....';
            }
            // Edit command
            if ($allowedToEditContent) {
                $out .= '<br /><br />' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?editContent=' . $thisCat['catId'] . '&uInfo=' . $userIdViewed)) . '">' . '<img src="' . get_icon_url('edit') . '" alt="' . get_lang('Edit') . '" />' . '</a>' . "\n";
            }
            $out .= '</blockquote>' . "\n";
        }
    }
}
// Back button for each display mode (bottom)
$out .= '<p>' . "\n" . '<small>' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_entry_url('CLUSR'))) . '">' . '&lt;&lt;&nbsp;' . get_lang('Back to user list') . '</a>' . "\n" . '</small>' . "\n" . '</p>' . "\n";
$claroline->display->body->appendContent($out);
echo $claroline->display->render();
Beispiel #12
0
	</div>
	<br> <br> <br> <br>
	<?php 
}
?>
	<div align="center" class="container">
			<?php 
echo '<small>Atlas ' . INFO_ATLAS_CODENAME . ' &ndash; ' . getFriendlyVersion(INFO_ATLAS_VERSION . '-' . INFO_ATLAS_STAGE) . '</small><br>';
if ((bool) unserialize(_CONFIG)['general']['debug']) {
    $PAGE_LOAD_END = explode(' ', microtime());
    $PAGE_LOAD_END = round($PAGE_LOAD_END[1] + $PAGE_LOAD_END[0] - $PAGE_LOAD_START, (int) unserialize(_CONFIG)['general']['page_generation_decimal']);
    echo '<small>Page generated in ' . $PAGE_LOAD_END . ' seconds.</small><br>';
    echo '<small>PHP ' . phpversion() . '</small><br>';
}
?>
	</div>
</footer>
<br>
<br>
<script type="text/javascript"
	src="<?php 
echo htmlize(unserialize(_CONFIG)['assets']['dir_js'] . '/jquery.js');
?>
"></script>
<script type="text/javascript"
	src="<?php 
echo htmlize(unserialize(_CONFIG)['assets']['dir_js'] . '/materialize.js');
?>
"></script>
</html>
Beispiel #13
0
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><?php 
echo $PAGE_TITLE;
?>
</title>
<link
	href="<?php 
echo htmlize(unserialize(_CONFIG)['assets']['dir_css'] . '/materialize.css');
?>
"
	rel="stylesheet">
<link
	href="<?php 
echo htmlize(unserialize(_CONFIG)['assets']['dir_css'] . '/materialdesignicons.css');
?>
"
	rel="stylesheet">
<style type="text/css">
.hidden {
	display: none;
}

.visible {
	display: block;
}
</style>
</head>

<nav class="<?php 
Beispiel #14
0
/**
 * Add a text notification to be displayed at the top of the page, e.g. a
 * successful database transaction or an error.
 *
 * $notification : plaintext to be displayed.
 */
function add_notification($notification, $icon = null)
{
    global $GLOBAL_PAGE_NOTIFICATIONS;
    $GLOBAL_PAGE_NOTIFICATIONS[] = htmlize($notification);
}
Beispiel #15
0
 public function __construct($url)
 {
     $msg = 'The URL ' . htmlize($url) . ' caused too many redirections.';
     parent::__construct($msg);
 }
Beispiel #16
0
    function print_polje($klasa, $lijevo, $id_detalji, $detalji)
    {
        if (count($detalji) == 0) {
            ?>
		<div class="log <?php 
            echo $klasa;
            ?>
">
			<span class="log-lijevo"><?php 
            echo $lijevo;
            ?>
</span>
		</div>
		<?php 
            return;
        }
        ?>
		<div class="log <?php 
        echo $klasa;
        ?>
" onclick="javascript:showhide('<?php 
        echo $id_detalji;
        ?>
')">
			<span class="log-lijevo"><?php 
        echo $lijevo;
        ?>
</span>
			<span class="log-detalji-link">detalji</span>
		</div>
		<div id="<?php 
        echo $id_detalji;
        ?>
" class="log-detalji">
		<?php 
        foreach ($detalji as $detalj) {
            ?>
			<div class="log-detalji1"><?php 
            echo date("H:i:s", $detalj['time']);
            ?>
			<?php 
            if (array_key_exists('add_lines', $detalj['text'])) {
                print "<span class=\"log-detalji1-add\">" . htmlize($detalj['text']['add_lines']) . "</span>";
            }
            if (array_key_exists('remove_lines', $detalj['text'])) {
                print "<span class=\"log-detalji1-remove\">" . htmlize($detalj['text']['remove_lines']) . "</span>";
            }
            if (array_key_exists('change', $detalj['text'])) {
                print "<span class=\"log-detalji1-change\">" . htmlize($detalj['text']['change']) . "</span>";
            }
            if (array_key_exists('lines', $detalj['text'])) {
                print "<span class=\"log-detalji1-lines\">" . htmlize($detalj['text']['lines']) . "</span>";
            }
            print "</div>\n";
        }
        print "</div>\n";
    }
Beispiel #17
0
 public function getTime()
 {
     return htmlize(id(new Date($this->time))->toBawkString());
 }
Beispiel #18
0
    if ($catList)
    {
        foreach ($catList as $thisCat)
        {
            // Category title

            echo	"<p><b>",$thisCat['title'],"</b></p>\n";

            // Category content

            echo	"<blockquote>\n";

            if ($thisCat['content'])
            {
                echo htmlize($thisCat['content'])."\n";
            }
            else
            {
                echo "....";
            }

            // Edit command

            if ($allowedToEditContent)
            {
                echo	"<br><br>\n",
                    "<a href=\"".api_get_self()."?".api_get_cidreq()."&editContent=",$thisCat['catId'],"&uInfo=",$userIdViewed,"\">",
                "<img src=\"../img/edit.gif\" border=\"0\" alt=\"edit\">",
                "</a>\n";
            }