本文整理汇总了PHP中Zend_Filter_Input::getRaw方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Filter_Input::getRaw方法的具体用法?PHP Zend_Filter_Input::getRaw怎么用?PHP Zend_Filter_Input::getRaw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Filter_Input
的用法示例。
在下文中一共展示了Zend_Filter_Input::getRaw方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteKompAction
public function deleteKompAction()
{
$post = new Zend_Filter_Input($_POST);
$kompy = new Komputery();
$db = $kompy->getAdapter();
$where = $db->quoteInto('id_komputer = ?', $post->getRaw('komputer_id'));
$rows_affected = $kompy->delete($where);
$this->_forward('komp', 'index');
}
示例2: usunankieteraAction
/**
* Akcja odpowiedzialna za usuniecie konta ankietera
*/
public function usunankieteraAction()
{
$post = new Zend_Filter_Input($_POST);
$user = new Uzytkownicy();
$db = $user->getAdapter();
$where = $db->quoteInto('id_uzytkownik = ?', $post->getRaw('ankieter_id'));
$rows_affected = $user->delete($where);
$this->_forward('admin', 'index');
}
示例3: dodajAction
function dodajAction()
{
$post = new Zend_Filter_Input($_POST);
$respondent = new Respondenci();
$another = trim($post->getRaw('email'));
$data = array('e_mail' => $another);
try {
$id = $respondent->insert($data);
$this->_redirect('/respondenci/');
} catch (Respondenci_Exception $e) {
$this->_forward('respondenci', 'index', array('insertionError' => $e->getMessage()));
}
}
示例4: mailAction
public function mailAction()
{
$respondent = new Respondenci();
$post = new Zend_Filter_Input($_POST);
if (strtolower($_SERVER['REQUEST_METHOD']) == 'post') {
if ($post->getRaw('akcja') == 'dodaj') {
$data = array('e_mail' => $post->getRaw('email'));
try {
$id = $respondent->insert($data);
} catch (Respondenci_Exception $e) {
//dodaj obslugę błędów
}
} else {
$db = $respondent->getAdapter();
$where = $db->quoteInto('e_mail = ?', $post->getRaw('email'));
try {
$respondent->delete($where);
} catch (Respondenci_Exception $e) {
//dodaj obslugę błędów
}
}
}
$this->_redirect('/');
}
示例5: testGetRaw
/**
* @deprecated since 0.8.0
* @return void
*/
public function testGetRaw()
{
$source = array('a b c');
$filter = new Zend_Filter_Input($source);
$this->assertContains('a b c', $filter->getRaw(0));
$this->assertFalse($filter->getRaw(1));
}
示例6: editSoftAction
public function editSoftAction()
{
$post = new Zend_Filter_Input($_POST);
$soft = new Oprogramowanie();
$db = $soft->getAdapter();
$where = $db->quoteInto('id_oprogramowanie = ?', $post->getRaw('oprogramowanie_id'));
$rows_affected = $soft->delete($where);
$this->_forward('index', 'index');
}
示例7: ajaxswapanswerAction
/**
* Ustala nową kolejność wariantów odpowiedzi
*/
public function ajaxswapanswerAction()
{
$post = new Zend_Filter_Input($_POST);
$obj = new Hamster_JQuery_Sortables();
$obj->setHash($post->getRaw('hash'));
$list = $obj->getSortArray();
$variants = new WariantyOdpowiedzi();
$ranking = 1;
if (isset($list)) {
foreach ($list as $answer_id) {
$row = $variants->find($answer_id);
$row->kolejnosc = $ranking;
$row->save();
$ranking++;
}
}
}
示例8: graficznyAction
/**
* Akcja dla :http://raport/graficzny
* i :http://raport/graficzny/ankieta/#id
*/
public function graficznyAction()
{
$post = new Zend_Filter_Input($_POST);
$poll = new Ankiety();
$db = $poll->getAdapter();
$pollId = $this->_getParam('ankieta');
if (empty($pollId)) {
$pollId = $post->getInt('ankieta_id');
}
$this->view->pool = $poll->find($pollId);
$questions = array();
//
$question = new Pytania();
$this->view->questions = $question->findAllWithAnkietaId($pollId);
$qV = array('jednokrotne' => 0, 'wielokrotne' => 1, 'otwarte' => 2);
$roz = array(array(x => 400, y => 300), array(x => 640, y => 480), array(x => 800, y => 600), array(x => 1024, y => 768));
$rozId = $post->getInt('roz_id');
$rap = new Raporty();
$info = $rap->FindInformationsAboutAnkietaId($pollId);
$fill = $rap->AmountOfFilledId($pollId);
$ques = $rap->AmountOfQuestionsId($pollId);
$licznik = 0;
$gTypes = array(array());
$wyjatki = array();
$selected = array();
foreach ($this->view->questions as $row) {
$queId = $row->idPytanie;
$queInfo = $rap->InfoAboutQuestionId($queId);
if ($queInfo["nazwa_typu"] != 'otwarte') {
$ansInfoA = $rap->InfoAboutAnswersId($queId);
$gTypes[$queId] = $post->getRaw("ID" . $queId);
if (!empty($gTypes[$queId])) {
$selected[$licznik++] = $queInfo["kolejnosc"];
}
$this->view->wyjatki = array();
$dane = array();
if ($queInfo["nazwa_typu"] == "jednokrotne") {
$ilosc = 0;
foreach ($ansInfoA as $kolejnosc => $ansInfo) {
$ilosc += $ansInfo["ilosc"];
}
} else {
$ilosc = $fill["fill"];
}
//foreach($ansInfoA as $kolejnosc => $ansInfo) $suma+=$ansInfo["ilosc"];
$suma = 0;
foreach ($ansInfoA as $kolejnosc => $ansInfo) {
$dane[$ansInfo['opis']] = $ilosc ? $ansInfo["ilosc"] * 100 / $ilosc : 0;
$suma += $ansInfo["ilosc"];
}
if (!empty($gTypes[$queId]) && in_array(0, $gTypes[$queId])) {
$p = new PlotQuestion($row->kolejnosc . ". " . $row->pytanie, $dane, $queId, $roz[$rozId]["x"], $roz[$rozId]["y"], 'barVPlot');
$p->generatePlot();
}
if (!empty($gTypes[$queId]) && in_array(1, $gTypes[$queId])) {
$p = new PlotQuestion($row->kolejnosc . ". " . $row->pytanie, $dane, $queId, $roz[$rozId]["x"], $roz[$rozId]["y"], 'barHPlot');
$p->generatePlot();
}
if (!empty($gTypes[$queId]) && in_array(2, $gTypes[$queId])) {
if ($suma == 0) {
$wyjatki[$queId] = true;
}
if ($queInfo["nazwa_typu"] == "jednokrotne" && $suma > 0) {
$p = new PlotQuestion($row->kolejnosc . ". " . $row->pytanie, $dane, $queId, $roz[$rozId]["x"], $roz[$rozId]["y"], 'piePlot');
$p->generatePlot();
}
}
} else {
//Pytania otwarte
//$this->view->ansInfo=$rap->AnswersOpened($queId);
//$this->view->body.=$this->view->render('/raport/PytOtwarte.php');
}
}
$this->view->wyjatki = $wyjatki;
$this->view->gTypes = $gTypes;
$this->view->selected = $selected;
$this->view->pollId = $pollId;
$this->view->body = $this->view->render('/raport/raportGraficzny.php');
$this->display();
}