Beispiel #1
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
<?php 
$real_title = get_site_title();
if (isset($title)) {
    $real_title = "{$real_title} - " . $title;
}
echo $real_title;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<base href="{base_url}" />
<?php 
render_stylesheet();
?>
<link rel="icon" href="{base_url}/static/images/favicon.ico"/>
<script src="{base_url}/static/javascript/jquery.min.js" type="text/javascript" ></script>
<script src="{base_url}/static/javascript/jquery.qtip.js" type="text/javascript" ></script>
<script src="{base_url}/static/javascript/jquery.qtip.ajax.js" type="text/javascript" ></script>
<script src="{base_url}/static/javascript/jquery-ui.min.js" type="text/javascript" ></script>
<script src="{base_url}/static/javascript/jquery.dataTables.js" type="text/javascript" ></script>
<script src="{base_url}/static/javascript/helpers.js" type="text/javascript" ></script>
</head>
<body>

<div id="page">

<div id="border" class="ui-corner-bottom">
 function reset_password_start($user_id)
 {
     $this->user_validation->clear_validation('password', $user_id);
     $code = random_uuid();
     $this->user_validation->set_code($user_id, 'password', $code);
     $user = $this->simiangrid->get_user($user_id);
     $email = $user['Email'];
     if (!send_email($email, set_message('sg_auth_password_subject', get_site_title()), set_message('sg_auth_password_body', site_url("auth/reset_password/{$code}")))) {
         push_message(set_message('sg_email_fail', $email), 'error');
         return false;
     } else {
         return true;
     }
 }
Beispiel #3
0
function meetup_recentwork()
{
    $i = 0;
    $api_response = wp_remote_get('http://api.meetup.com/2/profiles.json?key=' . MEETUP_API . '&sign=true&group_urlname=' . MEETUP_GROUP . '&page=100');
    $mfile = wp_remote_retrieve_body($api_response);
    $meetup = json_decode(preg_replace('/[\\x00-\\x1F\\x80-\\xFF]/', '', $mfile), true);
    $recentwork = array();
    $question_id_url = get_option('meetup_question_url');
    $question_id_img = get_option('meetup_question_img');
    foreach ($meetup['results'] as $person) {
        $id = $person['member_id'];
        if ($person['answers']) {
            foreach ($person['answers'] as $question) {
                if ($question['question_id'] == $question_id_url) {
                    $url = $question['answer'];
                }
                if ($question['question_id'] == $question_id_img) {
                    $img = $question['answer'];
                }
            }
        }
        if (strpos($img, '.jpg') !== false || strpos($img, '.png') !== false) {
            $recentwork[] = array('url' => $url, 'img' => $img, 'id' => $id);
        }
        $url = '';
        $img = '';
    }
    // Randomize recent work items to keep it fair & interesting
    shuffle($recentwork);
    $profile = get_option('meetup_people_index');
    $output = '<div class="home-recent-wrap">';
    foreach ($recentwork as $site) {
        $url = $site['url'];
        $img = $site['img'];
        // Skip if questions not answered
        if ($url && $img) {
            $thumb = wpthumb($img, 'width=330&height=220&crop=1&jpeg_quality=95', false);
            $profilepic = $profile[$site['id']]['photo'];
            $name = $profile[$site['id']]['name'];
            $link = $profile[$site['id']]['link'];
            $sitetitle = substr(get_site_title($url), 0, 30) . '...';
            if ($thumb) {
                $output .= '<div class="home-thumb-recent" style="background-image:url(' . $thumb . ')"><div class="home-thumb-recent-desc"><a href="' . $link . '"><img src="' . $profilepic . '" /></a><div class="home-recent-title"><a href="' . $url . '" rel="nofollow" target="_blank">' . $sitetitle . '</a></div><div class="home-recent-author"><em>by </em><a href="' . $link . '">' . $name . '</a></div></div></div>';
            } else {
                $i -= 1;
            }
        }
        if (++$i == 100) {
            break;
        }
    }
    $output .= '</div>';
    // Store in case of transient fail
    update_option('meetup_recentwork_backup', $output);
    return $output;
}