} elseif ($row->wiw_action == 'logout') { $loc = $lang->phrase('wwo_log_logout'); } else { $loc = $lang->phrase('wwo_log_login'); } break; case 'attachments': if ($row->wiw_action == 'thumbnail' || $row->wiw_action == 'attachment') { $loc = $lang->phrase('wwo_attachments_view'); } else { $loc = $lang->phrase('wwo_attachments_write'); } break; case 'docs': $id = $row->wiw_id; if ($my->p['docs'] == 1 && isset($wrap_cache[$id]) && GroupCheck($wrap_cache[$id]['groups'])) { $lid = getDocLangID($wrap_cache[$id]['titles']); $title = $wrap_cache[$id]['titles'][$lid]; $loc = $lang->phrase('wwo_docs'); } else { $loc = $lang->phrase('wwo_docs_fallback'); } break; case 'showforum': $id = $row->wiw_id; if (!isset($cat_cache[$id]['name']) || ($cat_cache[$id]['opt'] == 'pw' && (!isset($my->pwfaccess[$id]) || $my->pwfaccess[$id] != $cat_cache[$id]['optvalue']) || $my->pb[$id]['forum'] == 0)) { $loc = $lang->phrase('wwo_showforum_fallback'); } else { $title = $cat_cache[$id]['name']; $loc = $lang->phrase('wwo_showforum'); }
} $result = $db->query("SELECT * FROM {$db->pre}documents WHERE id = '{$id}' {$nonadmin} LIMIT 1"); if ($db->num_rows() != 1) { error($lang->phrase('docs_not_found')); } else { $info = $db->fetch_assoc($result); } /* Parser: 0 = Keiner, 1 = HTML, 2 = PHP(+HTML), 3 = BB-Code Template: Leer = Ausgabe, Vorhanden = Einfügen Inline: 0 = Template hinzufügen, 1 = Template in der Datei */ if ($my->p['docs'] == 1 && GroupCheck($info['groups'])) { $memberdata = cache_memberdata(); if (is_id($info['author']) && isset($memberdata[$info['author']])) { $info['name'] = $memberdata[$info['author']]; } else { $info['name'] = $lang->phrase('fallback_no_username'); } $info['date'] = str_date($lang->phrase('dformat1'), times($info['date'])); $info['update'] = str_date($lang->phrase('dformat1'), times($info['update'])); $type = doctypes(); if (isset($type[$info['type']])) { $typedata = $type[$info['type']]; } else { $typedata = array('title' => 'Fallback', 'template' => '', 'parser' => 1, 'inline' => 1, 'remote' => 0); } if ($typedata['inline'] == 0) {
} else { $loc = $lang->phrase('wwo_log_login'); } break; case 'attachments': if ($row->wiw_action == 'thumbnail' || $row->wiw_action == 'attachment') { $loc = $lang->phrase('wwo_attachments_view'); } else { $loc = $lang->phrase('wwo_attachments_write'); } break; case 'docs': $id = $row->wiw_id; if (isset($wrap_cache[$id]) && GroupCheck($wrap_cache[$id]['groups'])) { $lid = getDocLangID($wrap_cache[$id]['titles']); $title = $wrap_cache[$id]['titles'][$lid]; $loc = $lang->phrase('wwo_docs'); } else { $loc = $lang->phrase('wwo_docs_fallback'); } break; case 'showforum': $id = $row->wiw_id; if (!isset($cat_cache[$id]['name']) || (($cat_cache[$id]['opt'] == 'pw' && (!isset($my->pwfaccess[$id]) || $my->pwfaccess[$id] != $cat_cache[$id]['optvalue'])) || $my->pb[$id]['forum'] == 0)) { $loc = $lang->phrase('wwo_showforum_fallback'); } else { $title = $cat_cache[$id]['name'];
$data = array(); while ($row = $db->fetch_assoc($result)) { if (!is_array($info)) { $info = array('id' => $row['id'], 'author' => $row['author'], 'date' => $row['date'], 'date2' => $row['date'], 'update' => $row['update'], 'update2' => $row['update'], 'type' => $row['type'], 'groups' => $row['groups'], 'name' => null); } $data[$row['lid']] = array('content' => $row['content'], 'active' => $row['active'], 'title' => $row['title']); } /* Parser: 0 = None, 1 = HTML, 2 = PHP+HTML, 3 = BB-Code Template: Leer = Ausgabe, Vorhanden = Einfügen Inline: 0 = Template hinzufügen, 1 = Template in der Datei */ if (GroupCheck($info['groups'])) { $memberdata_obj = $scache->load('memberdata'); $memberdata = $memberdata_obj->get(); if (is_id($info['author']) && isset($memberdata[$info['author']])) { $info['name'] = $memberdata[$info['author']]; } else { $info['name'] = $lang->phrase('fallback_no_username'); } if ($info['date'] > 0) { $info['date'] = str_date($lang->phrase('dformat1'), times($info['date'])); } else { $info['date'] = $lang->phrase('docs_date_na'); } if ($info['update'] > 0) { $info['update'] = str_date($lang->phrase('dformat1'), times($info['update'])); } else {