Beispiel #1
0
 public function indexAction()
 {
     if ($this->isPostForm()) {
         $data = $this->post('data');
         if (empty($this->touserid)) {
             $this->callback(lang('a-mod-188'));
         }
         //接收者验证
         if ($this->model['setting']['member']['code'] && !$this->checkCode($this->post('code'))) {
             $this->callback(lang('for-4'));
         }
         if (!get_member_info($this->touserid)) {
             $this->callback(lang('a-mod-198'));
         }
         //接收者验证
         if ($this->memberPost($this->model['setting']['auth'])) {
             $this->callback(lang('m-con-12'));
         }
         if ($this->model['setting']['member']['post'] && empty($this->memberinfo)) {
             $this->callback(lang('for-5'));
         }
         if ($this->touserid == $this->memberinfo['id']) {
             $this->callback(lang('a-mod-199'));
         }
         //不对自己提交
         if ($this->model['setting']['member']['num'] && $this->check_num()) {
             $this->callback(lang('for-6'));
         }
         if ($this->model['setting']['member']['ip'] && $this->check_ip()) {
             $this->callback(lang('for-7', array('1' => $this->model['setting']['member']['ip'])));
         }
         if ($result = $this->checkFields($this->model['fields'], $data, 3)) {
             $this->callback($result);
         }
         $data['ip'] = client::get_user_ip();
         $data['status'] = empty($this->model['setting']['member']['check']) ? 1 : 0;
         $data['userid'] = empty($this->memberinfo) ? 0 : $this->memberinfo['id'];
         $data['username'] = empty($this->memberinfo) ? '' : $this->memberinfo['username'];
         $data['touserid'] = $this->touserid;
         $data['inputtime'] = $data['updatetime'] = time();
         if ($this->table->insert($data)) {
             //添加成功
             $this->callback($data['status'] ? lang('for-8') : lang('for-9'), $this->post('backurl'), 1);
         } else {
             $this->callback(lang('for-10'));
         }
     }
     $this->view->assign(array('model' => $this->model, 'fields' => $this->getFields($this->model['fields'], null, $this->model['setting']['member']['field']), 'modelid' => $this->modelid, 'touserid' => $this->touserid, 'tomember' => get_member_info($this->touserid, 1), 'meta_title' => $this->site['SITE_NAME']));
     $this->view->display('member/' . (is_file(VIEW_DIR . SYS_THEME_DIR . 'member' . DIRECTORY_SEPARATOR . $this->model['categorytpl']) ? substr($this->model['categorytpl'], 0, -5) : 'extend_post'));
 }
Beispiel #2
0
     if (!ereg($matchstring, $_POST['enth_email'])) {
         $messages['form'] = 'The email you supplied is not valid. Please ' . 'try again.';
     } else {
         $data['email'] = clean($_POST['enth_email']);
         $data['old_password'] = clean($_POST['enth_old_password']);
     }
 }
 // check validate password
 if ($_POST['enth_password'] != $_POST['enth_passwordv']) {
     $messages['password'] = '******' . 'if you have entered the new passwords correctly.';
 } else {
     $data['password'] = clean($_POST['enth_password']);
 }
 if (count($messages) == 0) {
     // fill out blank fields with current member info
     $member = get_member_info($listing, clean($_POST['enth_email']));
     // "new" email?
     if ($_POST['email_new'] == '') {
         $data['email_new'] = $member['email'];
     } else {
         $data['email_new'] = clean($_POST['enth_email_new']);
     }
     // new name?
     $data['name'] = ucwords(clean($_POST['enth_name']));
     if ($data['name'] == '') {
         $data['name'] = ucwords($member['name']);
     }
     // new country
     if (isset($_POST['enth_country']) && $_POST['enth_country'] == '') {
         $data['country'] = $member['country'];
     } else {
    } else {
        $fv_msg = 'Please clear the following Error(s):<br /><br />- ';
        $fv_msg_ar = array();
        foreach ($fv_errors as $fv_k => $fv_v) {
            $fv_msg_ar = array_merge($fv_msg_ar, $fv_v);
        }
        $fv_msg .= @implode('<br />- ', $fv_msg_ar);
        $_SESSION["CUSA_MSG_GLOBAL"] = array(false, $fv_msg);
        update_attempt_counts();
    }
}
//end if form post..
/////////////////////////////////////////////////////////////////////
#/ get Members Profile Info
include_once '../includes/profile_func.php';
$member_info_ar = get_member_info($member_id, $user_id);
$member_info = @$member_info_ar[0];
//var_dump("<pre>", $member_id, $member_info, mysql_error()); die();
if (!is_array($member_info) || !array_key_exists('user_ident', $member_info)) {
    redirect_me('404');
}
#/ User Permission
$user_permissions = @$member_info_ar[1];
//var_dump("<pre>", $user_permissions); die();
#/ Permission Images
$public = "{$consts['DOC_ROOT']}assets/images/secure_public.png";
$private = "{$consts['DOC_ROOT']}assets/images/secure_private.png";
#/ Current Profile Pic
$prof_pic = DOC_ROOT . "assets/images/ep.png";
if (array_key_exists('profile_pic', $member_info)) {
    if (!@empty($member_info['profile_pic'])) {
Beispiel #4
0
 public function extendAction()
 {
     $mid = (int) $this->get('modelid');
     $type = $this->get('type');
     $model = $this->cache->get('model_member_extend');
     $model = $model[$mid];
     $touser = (int) $this->get('touserid');
     if (empty($model)) {
         $this->adminMsg(lang('a-mod-168', array('1' => $mid)));
     }
     $table = $this->model($model['tablename']);
     switch ($type) {
         case 'set':
             //参数设置
             if ($this->isPostForm()) {
                 $cfg = $this->post('setting');
                 $data = $this->post('data');
                 $field = array();
                 if ($cfg['member']['field']) {
                     foreach ($cfg['member']['field'] as $c => $t) {
                         if ($t) {
                             $field[] = $c;
                         }
                     }
                     $cfg['member']['field'] = $field;
                 }
                 $cfg = array_merge($model['setting'], $cfg);
                 $model = $this->model('model');
                 $model->update(array('setting' => array2string($cfg)), 'modelid=' . $mid);
                 $this->adminMsg($this->getCacheCode('model') . lang('success'), url('admin/member/extend', array('modelid' => $mid, 'type' => 'set', 'touserid' => $touser, 'typeid' => $this->post('typeid'))), 3, 1, 1);
             }
             $tpl = 'admin/member_extend_config';
             $list_code = '{list table=' . $model['tablename'] . ' order=updatetime num=10}' . PHP_EOL . 'id:{$t[\'id\']}' . PHP_EOL . '{/list}' . PHP_EOL . '<!-- ' . lang('a-for-12') . ' -->' . PHP_EOL . PHP_EOL . '{sql:' . $model['tablename'] . ' where("' . lang('a-mod-183') . '")->select(false);}' . PHP_EOL . '<!-- ' . lang('a-mod-184') . ' -->' . PHP_EOL . PHP_EOL . '{url(\'member/extend\', array(\'modelid\'=>' . $mid . ',\'touserid\'=>' . lang('a-mod-187') . '))}' . PHP_EOL . '<!-- ' . lang('a-mod-185') . ' -->';
             $func_code = 'function mycallback($msg, $url, $state) {' . PHP_EOL . '	/*' . lang('a-mod-193') . '*/' . PHP_EOL . '}' . PHP_EOL . '$msg :' . lang('a-mod-194') . PHP_EOL . '$url :' . lang('a-mod-195') . PHP_EOL . '$state :' . lang('a-mod-196') . PHP_EOL . lang('a-mod-197');
             $this->view->assign(array('typeid' => $this->get('typeid') ? $this->get('typeid') : 1, 'list_code' => $list_code, 'func_code' => $func_code, 'rolemodel' => $this->user->get_role_list()));
             break;
         case 'edit':
             //修改
             $id = (int) $this->get('id');
             $data = $table->find($id);
             if (empty($data)) {
                 $this->adminMsg(lang('m-con-29'));
             }
             if ($this->isPostForm()) {
                 //模型投稿权限验证
                 if ($this->adminPost($model['setting']['auth'])) {
                     $this->adminMsg(lang('a-cat-100', array('1' => $this->userinfo['rolename'])));
                 }
                 $data = $this->post('data');
                 $this->checkFields($this->model['fields'], $data, 1);
                 $data['updatetime'] = time();
                 $table->update($data, 'id=' . $id);
                 $this->adminMsg(lang('success'), '', 3, 1, 1);
             }
             $this->view->assign(array('data' => $data, 'fields' => $this->getFields($model['fields'], $data, $model['setting']['member']['field']), 'tomember' => get_member_info($data['touserid'])));
             $tpl = 'admin/member_extend_edit';
             break;
         default:
             //列表数据
             if ($this->isPostForm() && $this->post('form') == 'search') {
                 $kw = $this->post('kw');
                 $stype = $this->post('stype');
                 $userid = (int) $this->post('userid');
                 $touser = (int) $this->post('touserid');
             } elseif ($this->isPostForm() && $this->post('form') == 'del' && $this->post('ids')) {
                 $ids = implode(',', $this->post('ids'));
                 $table->delete('id IN(' . $ids . ')');
             } elseif ($this->isPostForm() && $this->post('form') == 'status_1' && $this->post('ids')) {
                 $ids = implode(',', $this->post('ids'));
                 $table->update(array('status' => 1), 'id IN(' . $ids . ')');
             } elseif ($this->isPostForm() && $this->post('form') == 'status_0' && $this->post('ids')) {
                 $ids = implode(',', $this->post('ids'));
                 $table->update(array('status' => 0), 'id IN(' . $ids . ')');
             } elseif ($this->isPostForm() && $this->post('form') == 'status_3' && $this->post('ids')) {
                 $ids = implode(',', $this->post('ids'));
                 $table->update(array('status' => 3), 'id IN(' . $ids . ')');
             }
             $kw = $kw ? $kw : $this->get('kw');
             $page = $this->get('page') ? $this->get('page') : 1;
             $stype = $stype ? $stype : (int) $this->get('stype');
             $userid = $userid ? $userid : (int) $this->get('userid');
             $status = isset($_GET['status']) ? (int) $this->get('status') : 1;
             $pagelist = $this->instance('pagelist');
             $pagelist->loadconfig();
             $where = '`status`=' . $status;
             if ($userid) {
                 $where .= ' AND userid=' . $userid;
             }
             if ($touser) {
                 $where .= ' AND touserid=' . $touser;
             }
             if ($kw && $stype && isset($model['fields']['data'][$stype])) {
                 $where .= ' AND `' . $stype . '` LIKE "%' . $kw . '%"';
             }
             $total = $table->count($model['tablename'], 'id', $where);
             $pagesize = isset($this->site['SITE_ADMIN_PAGESIZE']) && $this->site['SITE_ADMIN_PAGESIZE'] ? $this->site['SITE_ADMIN_PAGESIZE'] : 8;
             $urlparam = array('kw' => $kw, 'page' => '{page}', 'type' => $type, 'stype' => $stype, 'status' => $status, 'userid' => $userid, 'modelid' => $mid);
             $data = $table->page_limit($page, $pagesize)->where($where)->order(array('updatetime DESC', 'id DESC'))->select();
             $pagelist = $pagelist->total($total)->url(url('admin/member/extend', $urlparam))->num($pagesize)->page($page)->output();
             $this->view->assign(array('kw' => $kw, 'page' => $page, 'list' => $data, 'join' => empty($this->join) ? 0 : 1, 'count' => $count, 'status' => $status, 'pagelist' => $pagelist));
             $tpl = 'admin/member_extend_list';
             break;
     }
     $count = array();
     $count[1] = $table->count($model['tablename'], null, 'status=1');
     $count[0] = $table->count($model['tablename'], null, 'status=0');
     $count[2] = $table->count($model['tablename'], null, 'status=2');
     $count[3] = $table->count($model['tablename'], null, 'status=3');
     if (isset($total)) {
         $count[$status] = $total;
     }
     $this->view->assign(array('count' => $count, 'model' => $model, 'modelid' => $mid, 'touserid' => $touser));
     $this->view->display($tpl);
 }
function make_results_table($slices, $signer, $ma_url, $sa_url)
{
    print "<h3>Results</h3>";
    if (count($slices) == 0) {
        print "<p>No results found. (warning: no partial matches!)</p>";
    } else {
        print "<table><tr><th>Slice name</th><th>Owner</th><th>Expiration</th><th>Next resource exp.</th><th>Actions</th></tr>";
        foreach ($slices as $slice) {
            $slice_urn = $slice[SA_SLICE_TABLE_FIELDNAME::SLICE_URN];
            $name = $slice[SA_SLICE_TABLE_FIELDNAME::SLICE_NAME];
            $expiration = dateUIFormat($slice[SA_SLICE_TABLE_FIELDNAME::EXPIRATION]);
            $owner_id = $slice[SA_SLICE_TABLE_FIELDNAME::OWNER_ID];
            $owner_detail_list = lookup_member_details($ma_url, $signer, array($owner_id));
            $owner_details = $owner_detail_list[$owner_id];
            $member = new Member($owner_id);
            $member->init_from_record($owner_details);
            $owner_name = $member->prettyName();
            $owner_email = $owner_details[MA_ATTRIBUTE_NAME::EMAIL_ADDRESS];
            $mailto_link = "<a href='mailto:{$owner_email}'>{$owner_name}</a>";
            $slivers = lookup_sliver_info_by_slice($sa_url, $signer, $slice_urn);
            if (count($slivers) == 0) {
                $next_exp = "<i>No resources for this slice</i>";
            } else {
                $first_sliver = reset($slivers);
                $next_exp = new DateTime($first_sliver[SA_SLIVER_INFO_TABLE_FIELDNAME::SLIVER_INFO_EXPIRATION]);
                foreach ($slivers as $sliver) {
                    $this_date = new DateTime($sliver[SA_SLIVER_INFO_TABLE_FIELDNAME::SLIVER_INFO_EXPIRATION]);
                    if ($next_exp > $this_date) {
                        $next_exp = $this_date;
                    }
                }
                $next_exp = dateUIFormat($next_exp);
            }
            print "<tr><td>{$name}</td><td>{$mailto_link}</td><td>{$expiration}</td><td>{$next_exp}</td>";
            print "<td><button onclick='expand_info(this);'>More info</button>";
            print "<button class='hideinfo' onclick='hide_info(this);' style='display:none;'>Close</button></td></tr>";
            $project_info = get_project_info($slice, $signer, $ma_url, $sa_url);
            $aggregate_info = get_aggregate_info($slice, $signer, $sa_url);
            $member_info = get_member_info($slice, $signer, $ma_url, $sa_url);
            print "<tr style='display:none'>";
            print "<td style='vertical-align:top'>";
            print "<b style='text-decoration: underline;'>Slice URN</b><br> {$slice_urn}<br><br>";
            print $project_info;
            print "</td>";
            print "<td colspan='2' style='vertical-align:top'>{$aggregate_info}</td>";
            print "<td colspan='2' style='vertical-align:top'>{$member_info}</td> </tr>";
        }
        print "</table>";
    }
}
Beispiel #6
0
 public function extendeditAction()
 {
     $id = (int) $this->get('id');
     $modelid = (int) $this->get('modelid');
     if (!isset($this->emodel[$modelid])) {
         $this->memberMsg(lang('a-mod-4'));
     }
     $post = $this->memberPost($this->emodel[$modelid]['setting']['auth']);
     $admin = $this->emodel[$modelid]['setting']['member']['admin'];
     if (!$admin && $post) {
         $this->memberMsg(lang('m-con-12'));
     }
     //权限验证
     $extend = $this->model($this->emodel[$modelid]['tablename']);
     //实例化模型
     $data = $extend->find($id);
     if (empty($data)) {
         $this->memberMsg(lang('m-con-29'));
     } elseif ($data['userid'] != $this->memberinfo['id'] && $data['touserid'] != $this->memberinfo['id']) {
         $this->memberMsg(lang('m-con-29'));
     }
     if ($this->isPostForm()) {
         if ($data['userid'] == $this->memberinfo['id']) {
             //我的提交,修改操作
             $edit = $this->post('data');
             $this->checkFields($this->emodel[$modelid]['fields'], $edit, 2);
             //删除系统保留字段
             unset($edit['touserid'], $edit['userid'], $edit['username'], $edit['status'], $edit['inputtime'], $edit['ip']);
             $edit['status'] = empty($this->emodel[$modelid]['setting']['member']['check']) ? 1 : 0;
             $edit['updatetime'] = time();
             $extend->update($edit, 'id=' . $id);
             $this->memberMsg($edit['status'] ? lang('success') : lang('for-9'), '', 1);
         } elseif ($data['touserid'] == $this->memberinfo['id'] && $admin && ($data['status'] == 0 || $data['status'] == 2)) {
             //对我的提交,审核操作
             $edit['verify'] = $this->post('verify');
             $edit['status'] = $this->post('status');
             $extend->update($edit, 'id=' . $id);
             $this->memberMsg(lang('success'), '', 1);
         }
     }
     $this->view->assign(array('data' => $data, 'modelid' => $modelid, 'tomember' => get_member_info($data['touserid'], 1), 'meta_title' => $this->emodel[$modelid]['modelname'] . '-' . lang('member') . '-' . $this->site['SITE_NAME'], 'data_fields' => $this->getFields($this->emodel[$modelid]['fields'], $data)));
     if ($data['userid'] == $this->memberinfo['id']) {
         //我的提交
         $this->view->display('member/extend_edit');
     } elseif ($data['touserid'] == $this->memberinfo['id'] && $admin && ($data['status'] == 0 || $data['status'] == 2)) {
         //对我的提交,我具有管理权限
         $this->view->display('member/extend_verify');
     } else {
         //对我提交的,无管理则查看权限
         $this->view->display('member/extend_show');
     }
 }
Beispiel #7
0
                    if (!$success) {
                        echo '<p class="error">Error rejecting member with ' . 'email address <i>' . $_REQUEST['email'] . '</i>.</p>';
                    }
                }
                echo '<p class="success">Finished rejecting selected members.</p>';
            }
        }
    }
    $listing = '';
    // free up memory
    unset($info, $subject, $headers, $success, $body);
}
/*______________________________________________________________________EDIT_*/
if ($action == 'edit') {
    $info = get_listing_info($listing);
    $member = get_member_info($listing, $_REQUEST['email']);
    $show_default = false;
    $show_edit_form = true;
    if (isset($_POST['done'])) {
        $success = edit_member_info($listing, $_REQUEST['email'], $_POST);
        if ($success) {
            echo '<p class="success">Successfully edited the information of ' . 'the member with email address <i>' . $_REQUEST['email'] . '</i> in the <i>' . $info['subject'] . ' ' . $info['listingtype'] . '</i>.</p>';
            $show_edit_form = false;
            $show_default = true;
            // if index "approved" is present, the page is from the pending mem
            // unset $listing
            if (isset($_REQUEST['approved'])) {
                $listing = '';
            }
        }
    }
function table_result_str($members, $offset_page, $prev_page, $next_page, $pages_count, $current_page)
{
    $img = array("&nbsp;", "&nbsp;", "&nbsp;", "&nbsp;");
    if ($current_page != 1) {
        $img[0] = "<a href=\"javascript:doQuery('', 0);\"><img src='/egroupware/phpgwapi/templates/idots/images/first-grey.png' title='" . lang("elg_first") . "' border='0' hspace='2' /></a>";
        $img[1] = "<a href=\"javascript:doQuery('', " . ($prev_page - 1) * $offset_page . ");\"><img src='/egroupware/phpgwapi/templates/idots/images/left-grey.png' border='0' title='" . lang("elg_previous") . "' hspace='2' /></a>";
    }
    if ($pages_count > 1 && $current_page != $pages_count) {
        $img[2] = "<a href=\"javascript:doQuery('', " . ($next_page - 1) * $offset_page . ");\"><img src='/egroupware/phpgwapi/templates/idots/images/right-grey.png' border='0' title='" . lang("elg_next") . "' hspace='2' /></a>";
        $img[3] = "<a href=\"javascript:doQuery('', " . ($pages_count - 1) * $offset_page . ");\"><img src='/egroupware/phpgwapi/templates/idots/images/last-grey.png' border='0' title='" . lang("elg_last") . "' hspace='2' /></a>";
    }
    $res_str = '<table align="center" border="0" cellspacing="1" class="tableLayout">';
    $res_str .= sprintf('<tr><td colspan="8">
		<table width="100%%" border="0" cellspacing="1" cellpadding="0">
			<tr>
				<td width="15">%s</td>
				<td width="15">%s</td>
				<td width="90%%">%s</td>
				<td width="15">%s</td>
				<td width="15">%s</td>
			</tr>
		</table>
	</td></tr>', $img[0], $img[1], "&nbsp;", $img[2], $img[3]);
    $res_str .= sprintf('<tr class="tableHeader">
							<td>%s</td>
							<td>%s</td>
							<td>%s</td>
							<td>%s</td>
							<td>%s</td>
							<td>%s</td>
							<td>%s</td>
							<td>&nbsp;</td>
						</tr>', lang("Status"), lang("Name/Surname"), lang("Member since (date)"), lang("Professional Status"), lang("Industry"), lang("Occupation area"), lang("City of Residence"));
    $db = $GLOBALS['phpgw']->db;
    $counter = 0;
    foreach ($members as $member) {
        $userInfo = get_member_info($db, $member[account_lid]);
        $sufix = $userInfo[gender] . "" == "" || $userInfo[gender] . "" == "0" ? "m" : "w";
        $imgStatus = '<img border="0" width="16" height="16" alt="' . ($member[account_status] == "A" ? lang("Active") : lang("Disabled")) . '" src="/members/_templates/default/' . ($member[account_status] == "A" ? "user-" . $sufix . "-active.png" : "user-" . $sufix . "-disabled.png") . '"/>';
        $isOnline = $member['account_pwd'] != null;
        if ($member['account_status'] == 'A') {
            $res_str .= sprintf('<tr class="%s"><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s<a href="javascript:ShowInfo(%d);void(0);">%s</a></td></tr>', $counter++ % 2 == 0 ? "altRow" : "Row", $imgStatus, ($isOnline ? "<b>" : "") . $member['account_firstname'] . " " . $member['account_lastname'] . ($isOnline ? "</b>" : ""), $member['account_membership_date'], GetValueFromElggList("prof_profile", $userInfo["prof_profile"]), GetValueFromElggList("industries", $userInfo["industries"]), GetValueFromElggList("occ_areas", $userInfo["occ_areas"]), $userInfo[residence_city] ? $userInfo[residence_city] : "-", get_view_layout($member, $userInfo), $member['account_id'], lang("Details"));
        } else {
            $res_str .= sprintf('<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td><font color="red">%s</font></td></tr>', $imgStatus, ($isOnline ? "<b>" : "") . $member['account_firstname'] . " " . $member['account_lastname'] . ($isOnline ? "</b>" : ""), $member['account_membership_date'], GetValueFromElggList("prof_profile", $userInfo["prof_profile"]), GetValueFromElggList("industries", $userInfo["industries"]), GetValueFromElggList("occ_areas", $userInfo["occ_areas"]), $userInfo[residence_city] ? $userInfo[residence_city] : "-", lang("elg_inactive"));
        }
    }
    $res_str .= '</table>';
    return $res_str;
}
Beispiel #9
0
    $smarty->assign("assign", $assign);
    $smarty->display('company/admin_company_user_clue_list.htm');
} elseif ($act == 'clue_detail') {
    get_token();
    require_once ADMIN_ROOT_PATH . 'include/admin_user_fun.php';
    $id = !empty($_REQUEST['cid']) ? $_REQUEST['cid'] : adminmsg("参数有误!", 1);
    $clue = get_clue_one($id);
    $company_profile = get_company_one_id($clue["company_id"]);
    $clue_log = get_clue_log_list($id);
    $promotion = get_promotion_info($clue["job_id"], 5);
    if ($promotion) {
        $json = str_replace('&quot;', '"', trim($promotion["cp_json"]));
        $json = json_decode($json);
        $promotion = array_merge($promotion, (array) $json);
    }
    $member = get_member_info($clue["uid"]);
    if ($clue["member_id"]) {
        $resume["uid"] = $clue["member_id"];
        $resume["list"] = get_resume_uid($clue["member_id"]);
        $smarty->assign('resume', $resume);
        //dump($resume);
    }
    $smarty->assign('clue', $clue);
    $smarty->assign('company_profile', $company_profile);
    $smarty->assign('promotion', $promotion);
    $smarty->assign('member', $member);
    $smarty->assign('clue_log', $clue_log);
    $smarty->assign('url', $_SERVER["HTTP_REFERER"]);
    $smarty->assign('pageheader', "人才访问记录");
    $smarty->display('company/admin_company_clue_detail.htm');
} elseif ($act == 'clue_log_save') {
Beispiel #10
0
        echo "<p{$errorstyle}>ERROR: Attempted circumventing of the form detected.</p>";
        return;
    }
    $email = '';
    $matchstring = "^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+" . "@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}\$";
    if (!ereg($matchstring, clean($_POST['enth_email'])) || !ctype_graph(clean($_POST['enth_email']))) {
        ?>
      <p style="font-weight: bold;" class="show_lostpass_bad_email">That
      email address is not valid. Please check your entered address and try
      again.</p>
<?php 
        return;
    } else {
        $email = clean($_POST['enth_email']);
    }
    $member = get_member_info($listing, $email);
    if ($member['email'] == '') {
        ?>
      <p style="font-weight: bold;" class="show_lostpass_no_such_member">There 
      was an error in  your request to reset your password. This may be 
      because there is no member recorded in the <?php 
        echo $info['listingtype'];
        ?>
      with that email address. Please check your spelling and try
      again.</p>
<?php 
    } else {
        $password = reset_member_password($listing, $member['email']);
        // send email
        $to = $member['email'];
        $subject = $info['title'] . ' ' . ucfirst($info['listingtype']) . ': Password Reset';