MooMessage("报名成功", "index.php"); } else { MooMessage("数据出错", $request_url, '', '1', 1); } } } //注册验证码 function code() { //验证码 $img = MooAutoLoad('MooSeccode'); $img->outCodeImage(125, 30, 4); } $h = MooGetGPC('h', 'string', 'G'); switch ($h) { case 'personal': personal(); break; case 'company': company(); break; case 'register': register(); break; case 'seccode': code(); break; default: personal(); break; }
<?php if (!login()) { echo "<div class='box warning'>로그인을 하십시오.</div>"; return; } $company = company()->load(hi('id')); if (!$company) { echo "<div class='box warning'>업소 정보가 존재하지 않습니다.</div>"; return; } if (empty($company->get('username')) || $company->username != login()->username) { echo "<div class='box warning'>삭제 실패 : 회원님의 업소가 아닙니다.</div>"; return; } $company->delete(); ?> <h1>업소록 삭제</h1> 업소록 정보가 삭제되었습니다.
<?php $key = hi('keyword'); $companies = company()->loadQuery("ceo_name LIKE '%{$key}%' OR company_name LIKE '%{$key}%' OR title LIKE '%{$key}%'"); $count = count($companies); ?> <style> .companies { } .companies .company { margin:.4em 0; background-color:#efefef; } </style> <?php if ($count == 0) { return; } display_companies($companies);
<?php if (!login()) { echo "<h1>로그인을 하십시오.</h1>"; return; } $username = login()->username; $companies = company()->loadQuery("username='******'"); $count = count($companies); ?> <style> .companies { } .companies .company { margin:.4em 0; background-color:#efefef; } </style> <h1> 내가 등록한 업소 목록 </h1> <h2> 업소를 클릭 한 다음 맨 아래의 메뉴에서 수정 버튼을 클릭하시면 됩니다. </h2> <?php if ($count == 0) { return; } display_companies($companies);
margin:0 auto; width:66px; height:auto; } .categories ul .text { display:block; top:52px; left:0; right:0; } </style> <div class="front-page"> 총 <span class="count"><?php echo company()->count(); ?> </span> 개의 업소가 등록되어져 있습니다. <form class='search'> <input type="text" name="keyword" value=""> <input type="submit" value="Search"> </form> <div class="categories"> <ul> <?php $cats = category()->loadAllArray(); foreach ($cats as $cat) {
function add_shift($day, $start, $end) { try { //open database $db = new PDO('sqlite:schedule.sqlite'); $qry = $db->prepare('INSERT INTO shifts (date, start, end, company) values(?, ?, ?, ?)'); $qry->execute(array($day, $start, $end, company())); } catch (PDOException $e) { print 'exception: ' . $e->getMessage(); } }
} </style> <h2> <?php echo $category->code; ?> </h2> <h3> <?php echo $category->value; ?> </h3> <div class="desc"> 총 <?php echo $count_company; ?> 개의 <?php echo $category_name; ?> 업소가 있습니다. </div> <?php if ($count_company == 0) { return; } ?> <?php $companies = company()->loadQuery("category={$category_id}"); display_companies($companies);