Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as PHP by wilku ( 14 years ago )
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Welcome extends Controller_Template {
public $template = "template";
public function before()
{
parent::before();
$this->template->test = new View('test');
$this->template->test->message = '';
}
public function action_index()
{
$post = $this->request->post();
if(isset($post['ok']))
{
$this->template->test->message = 'OK';
$linki = explode("\n", $post['linki']);
foreach($linki as $wartosc)
{
preg_match("/[|0-9|]\/(.*)\./", $wartosc, $marker);
DB::update('test')->set(array('link' => $wartosc))->where('marker', '=', $marker);
}
}
}
}
?>
Revise this Paste