public function run() { DB::table('contact_page')->delete(); ContactPage::create(['headline' => 'Team 1', 'text' => "AENEAN IMPERDIET MI QUIS METUS LUCTUS, EGET ACCUMSAN MI EUISMOD. PELLENTESQUE VOLUTPAT LIBERO NEC EROS RHONCUS LACINIA. DONEC FELIS EROS, VULPUTATE AC MATTIS ET, COMMODO DAPIBUS NEQUE. PHASELLUS DIGNISSIM NULLA AT MAURIS BIBENDUM ACCUMSAN. MAECENAS LACINIA IN EX UT FINIBUS. NULLAM IMPERDIET VEL EROS VITAE VIVERRA. MAECENAS EGET LECTUS SCELERISQUE, VESTIBULUM LACUS NEC, DAPIBUS DUI. CUM SOCIIS NATOQUE PENATIBUS ET MAGNIS DIS PARTURIENT MONTES, NASCETUR RIDICULUS MUS. AENEAN ARCU DIAM, FACILISIS QUIS MAURIS NEC, FINIBUS ALIQUET ELIT. QUISQUE DIAM RISUS, FINIBUS EU HENDRERIT QUIS, SODALES UT EROS. DONEC SUSCIPIT ID LACUS AC PHARETRA. NAM SIT AMET SAGITTIS JUSTO, ET ULTRICIES EROS. FUSCE EGESTAS, LIBERO UT PORTA BLANDIT, LEO TURPIS CONSEQUAT QUAM, VARIUS EUISMOD MAGNA DUI EU LEO."]); ContactPage::create(['headline' => 'Team 2', 'text' => "DUIS LACINIA, DUI ID BLANDIT MATTIS, TURPIS METUS CURSUS DUI, EGET EUISMOD ARCU MAGNA EU LIGULA. NULLAM MATTIS COMMODO ODIO NEC IMPERDIET. CURABITUR EGET LEO MATTIS, FACILISIS ORCI TINCIDUNT, VESTIBULUM PURUS. INTERDUM ET MALESUADA FAMES AC ANTE IPSUM PRIMIS IN FAUCIBUS. DUIS EU ACCUMSAN NISI. SUSPENDISSE MAXIMUS CONDIMENTUM METUS AT PORTTITOR. DONEC TEMPUS DIGNISSIM NUNC VEL EUISMOD. VIVAMUS TINCIDUNT AUGUE SAPIEN, EU FACILISIS SEM DAPIBUS NON. IN SIT AMET SEM BIBENDUM, ALIQUET QUAM SED, PELLENTESQUE LACUS. IN SOLLICITUDIN TORTOR ET IPSUM FERMENTUM ELEMENTUM. NULLA EGET ENIM NON LIGULA FRINGILLA PLACERAT. QUISQUE A MAURIS GRAVIDA, ALIQUAM LECTUS ID, DAPIBUS SEM. MAECENAS SED DIAM IN TELLUS CONVALLIS MOLLIS SIT AMET ID NISI. PELLENTESQUE SODALES DICTUM FACILISIS. DONEC ORNARE NULLA PORTTITOR, DIGNISSIM EX IN, LUCTUS RISUS. SED CONVALLIS PHARETRA NUNC, SIT AMET MOLESTIE VELIT."]); ContactPage::create(['headline' => 'Team 3', 'text' => "PROIN ID SEM QUIS ARCU ALIQUET ALIQUAM. VIVAMUS PELLENTESQUE SUSCIPIT LOREM, VITAE SOLLICITUDIN EROS EFFICITUR FAUCIBUS. MAURIS ULTRICES, AUGUE VEL CONGUE MOLLIS, METUS SAPIEN ORNARE LOREM, IN ELEMENTUM DOLOR ODIO A AUGUE. IN IPSUM NISL, ALIQUET SED VIVERRA QUIS, FAUCIBUS EGET NUNC. MAECENAS TEMPUS LOREM SED EST TRISTIQUE, ET TRISTIQUE NEQUE GRAVIDA. ALIQUAM SOLLICITUDIN MAGNA VEL EROS ULLAMCORPER IMPERDIET. FUSCE DAPIBUS MAURIS VITAE ENIM MATTIS, QUIS LACINIA ENIM VEHICULA. DUIS IACULIS TRISTIQUE EROS, ID FAUCIBUS MAURIS PELLENTESQUE ID. UT TRISTIQUE AUCTOR VARIUS. FUSCE AT PORTTITOR DUI. NULLAM PRETIUM SIT AMET ELIT UT CONVALLIS. MAURIS SCELERISQUE VELIT IN SCELERISQUE CONSECTETUR."]); }
/** * We only admit one */ function canCreate($member = null) { if (ContactPage::get()->Count() > 1) { return false; } else { return true; } }
public function getContact() { $teams = ContactPage::all(); return View::make('site.contact', array('teams' => $teams)); }
public function postContactTeamsPage($id = null) { $input = Input::all(); $data = array('headline' => $input['headline'], 'text' => $input['text']); if ($id) { $contactPage = ContactPage::findOrFail($id); $contactPage->text = $input['text']; $contactPage->headline = $input['headline']; $contactPage->save(); $contactPage->update($data); } else { $contactPage = ContactPage::create($data); } return Redirect::back(); }
/** * Create a unique email link that is connected with the Contact Form * * @return string get the link to the contact page */ public function EmailLink() { if (!empty($this->Email)) { $page = ContactPage::get()->first(); if ($page) { return $page->Link() . "staff/{$this->ID}"; } } return false; }
public function getContactPage() { return ContactPage::get()->First(); }
$address = get_http_var('address'); $twitter = get_http_var('twitter'); $twitter = preg_replace("/^@+/", "", $twitter); // address db_do("DELETE FROM journo_address WHERE journo_id=?", $this->journo['id']); if ($address) { db_do("INSERT INTO journo_address (journo_id,address) VALUES (?,?)", $this->journo['id'], $address); } // phone db_do("DELETE FROM journo_phone WHERE journo_id=?", $this->journo['id']); if ($phone) { db_do("INSERT INTO journo_phone (journo_id,phone_number) VALUES (?,?)", $this->journo['id'], $phone); } // email db_do("DELETE FROM journo_email WHERE journo_id=? AND srctype=''", $this->journo['id']); if ($email) { db_do("INSERT INTO journo_email (journo_id,email,srctype,srcurl,approved) VALUES (?,?,?,?,?)", $this->journo['id'], $email, '', '', TRUE); } // twitter db_do("DELETE FROM journo_weblink WHERE journo_id=? AND kind='twitter'", $this->journo['id']); if ($twitter) { $twitter_url = 'http://twitter.com/' . $twitter; $twitter_desc = $this->journo['prettyname'] . ' on Twitter'; db_do("INSERT INTO journo_weblink (journo_id,url,description,approved,kind) VALUES (?,?,?,true,'twitter')", $this->journo['id'], $twitter_url, $twitter_desc); } db_commit(); eventlog_Add('modify-contact', $this->journo['id']); } } $page = new ContactPage(); $page->run();
<?php session_start(); require_once "private/lib/utilities.php"; require_once "private/lib/classes/pages/contact_page.php"; $has_captcha_error = false; if (isset($_GET['err'])) { $has_captcha_error = true; } $page = new ContactPage($has_captcha_error); $page->header(array('title' => 'Contact Us')); $page->insert_contact_css(); $page->insert_contact_scripts(); $page->insert_inline_scripts(); $page->show(); $page->footer();