$tab->addClickableIconColumn('Forget', 'trackid', 'edit-clear', 'forget'); $tab->addClickableIconColumn('Download', 'trackid', 'document-save', 'down'); $tab->addClickableIconColumn('Replay', 'trackid', 'media-playback-start', 'play'); // We register the table. $c->register($tab); break; /* --------------------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------------------- */ case 'process': if (count($chunks) > 0) { foreach ($chunks as $chunk) { // We split the chunk into triplets. $triplets = explode('#', $chunk['content']); // We parse the first triplet (it's special) $fields = parseTriplet(array_shift($triplets)); $q->insertList(array('track_id' => $chunk['id'], 't' => 0, 'action' => 'resize', 'xc' => $fields['vpw'], 'yc' => $fields['vph']))->into('event')->run(); // We put the offset into the track table. $q->update('offset', $fields['offset'])->into('track')->where("id=" . $chunk['id'])->run(); // We process each triplet. foreach ($triplets as $triplet) { $fields = parseTriplet($triplet); $fields['track_id'] = $chunk['id']; switch ($fields['action']) { case 'mv': // No further processing is necessary in this case. break; case 'm-clk': replaceKey($fields, 'id', 'xtra1'); replaceKey($fields, 'which', 'xtra2'); break; case 'm-ent':