} echo '<result><status>ERROR</status><message>' . htmlspecialchars('<span style="color:red;">' . $this->lang('pf_atchbx_err_videmb') . '</span>') . '</message></result>'; return; } if ($attach_type == 'file') { if (!isset($s['POSTFORM_TEMP_FILES']) || !isset($s['POSTFORM_TEMP_FILES'][$attach_data])) { echo '<result><status>WAIT</status></result>'; return; } $f =& $s['POSTFORM_TEMP_FILES'][$attach_data]; if ($f) { if ($ff = $p->attach_file($C->TMP_DIR . $f->tempfile, $f->filename)) { rm($C->TMP_DIR . $f->tempfile); unset($s['POSTFORM_TEMP_FILES'][$attach_data]); echo '<result><status>OK</status>'; echo '<attach text="' . htmlspecialchars('<a href="' . $C->SITE_URL . 'getfile/tmpid:' . $post_temp_id . '/' . htmlspecialchars($ff->title) . '" onfocus="this.blur();" title="' . htmlspecialchars($ff->title) . '">' . htmlspecialchars(str_cut_link($ff->title, 16)) . '</a>') . '" />'; echo '</result>'; return; } } echo '<result><status>ERROR</status><message>' . htmlspecialchars('<span style="color:red;">' . $this->lang('pf_atchbx_err_file') . '</span>') . '</message></result>'; return; } if ($attach_type == 'image') { $image_is_from = substr($attach_data, 0, 4); $attach_data = substr($attach_data, 4); if ($image_is_from == "url|") { if ($i = $p->attach_image($attach_data, urldecode(basename($attach_data)))) { echo '<result><status>OK</status>'; echo '<attach text="' . htmlspecialchars('<a href="' . $C->TMP_URL . $i->file_original . '" target="_blank" onfocus="this.blur();" title="' . htmlspecialchars($i->title) . '">' . htmlspecialchars(str_cut($i->title, 16)) . '</a>') . '" />'; echo '</result>';
?> </div> <p class="message"><?php echo $D->p->parse_text(); ?> </p> <?php if (isset($D->p->post_attached['link'])) { ?> <div class="attachment"> <a href="<?php echo htmlspecialchars($D->p->post_attached['link']->link); ?> " target="_blank" rel="nofollow"><?php echo htmlspecialchars(str_cut_link($D->p->post_attached['link']->link, 40)); ?> </a><br /> <div class="klear"></div> </div> <?php } ?> <?php if (isset($D->p->post_attached['file'])) { ?> <div class="attachment"> <a href="<?php echo $C->SITE_URL; ?>
" onclick="return confirm('<?php echo $this->lang('st_rssfeeds_feed_delcnf'); ?> ');" title="<?php echo $this->lang('st_rssfeeds_feed_delete'); ?> " onfocus="this.blur();" class="grpdelbtn"></a> <?php echo htmlspecialchars(str_cut($f->feed_title, 35)); ?> <span><a href="<?php echo htmlspecialchars($f->feed_url); ?> " target="_blank"><?php echo htmlspecialchars(str_cut_link($f->feed_url, 50)); ?> </a></span> <?php if (!empty($f->filter_keywords)) { ?> <span><?php echo $this->lang('st_rssfeeds_feed_filter'); ?> <?php echo htmlspecialchars($f->filter_keywords); ?> </span> <?php } ?>
<?php } ?> <div class="posttext"> <?php echo $D->p->parse_text(); ?> </div> <?php if (isset($D->p->post_attached['link'])) { ?> <a href="<?php echo htmlspecialchars($D->p->post_attached['link']->link); ?> " class="postlink" target="_blank" rel="nofollow"><?php echo htmlspecialchars(str_cut_link($D->p->post_attached['link']->link, $D->parsedpost_attlink_maxlen)); ?> </a> <?php } ?> <?php if (isset($D->p->post_attached['file'])) { ?> <a href="<?php echo $C->SITE_URL; ?> getfile/pid:<?php echo $D->p->post_tmp_id; ?> /<?php
$message = htmlspecialchars(preg_replace('/\\s+/ius', ' ', $p->post_message)); $attached = array(); foreach ($p->post_attached as $k => $v) { $obj = (object) array('type' => $k, 'id' => $v->attachment_id, 'text' => ''); if ($k == 'image') { $obj->text = htmlspecialchars(str_cut($v->title, 16)); $obj->text = '<a href="' . $C->IMG_URL . 'attachments/' . $this->network->id . '/' . $v->file_original . '" target="_blank" onfocus="this.blur();">' . $obj->text . '</a>'; $obj->text = htmlspecialchars($obj->text); } elseif ($k == 'file') { $obj->text = htmlspecialchars(str_cut($v->title, 16)); $obj->text = '<a href="' . $C->SITE_URL . 'getfile/pid:' . $p->post_tmp_id . '/' . htmlspecialchars($v->title) . '" target="_blank" onfocus="this.blur();">' . $obj->text . '</a>'; $obj->text = htmlspecialchars($obj->text); } elseif ($k == 'link') { $obj->text = htmlspecialchars(str_cut_link($v->link, 16)); $obj->text = '<a href="' . $v->link . '" target="_blank" onfocus="this.blur();">' . $obj->text . '</a>'; $obj->text = htmlspecialchars($obj->text); } elseif ($k == 'videoembed') { $obj->text = htmlspecialchars(str_cut_link($v->orig_url, 16)); $obj->text = '<a href="' . $v->orig_url . '" target="_blank" onfocus="this.blur();">' . $obj->text . '</a>'; $obj->text = htmlspecialchars($obj->text); } $attached[] = $obj; } echo '<result>'; echo '<post id="' . $m[1] . '_' . $m[2] . '" message="' . $message . '">'; foreach ($attached as $obj) { echo '<attach type="' . $obj->type . '" id="' . $obj->id . '" text="' . $obj->text . '" />'; } echo '</post>'; echo '</result>'; return;
</div> <?php } elseif ($D->type == 'videoembed') { ?> <div class="flyboxattachment"> <?php echo $D->att->embed_code; ?> </div> <div class="flyboxdata"> <a href="<?php echo $D->att->orig_url; ?> " target="_blank"><?php echo str_cut_link($D->att->orig_url, 55); ?> </a> <!-- <a href="<?php echo $D->att->orig_url; ?> " target="_blank"><?php echo $this->lang('post_atchvid_ftr_site'); ?> </a> · <a href="<?php echo $D->p->permalink; ?> " target="_top"><?php echo $this->lang('post_atchftr_permalink');
} $p =& $s['POSTFORM_TEMP_POSTS'][$post_temp_id]; if ($attach_type == 'link' && $C->ATTACH_LINK_DISABLED == 0) { if ($l = $p->attach_link($attach_data)) { echo '<result><status>OK</status>'; echo '<attach text="' . htmlspecialchars($l->link) . '" />'; echo '</result>'; return; } echo '<result><status>ERROR</status><message>' . $this->lang('iphone_pf_atchbx_err_link') . '</message></result>'; return; } if ($attach_type == 'videoembed' && $C->ATTACH_VIDEO_DISABLED == 0) { if ($v = $p->attach_videoembed($attach_data)) { $txt = preg_replace('/^(http|https|ftp)\\:\\/\\//iu', '', $v->orig_url); $txt = str_cut_link($txt, 16); echo '<result><status>OK</status>'; echo '<attach text="' . htmlspecialchars($v->orig_url) . '" />'; echo '</result>'; return; } echo '<result><status>ERROR</status><message>' . $this->lang('iphone_pf_atchbx_err_videmb') . '</message></result>'; return; } if ($attach_type == 'file' && $C->ATTACH_FILE_DISABLED == 0) { if (!isset($s['POSTFORM_TEMP_FILES']) || !isset($s['POSTFORM_TEMP_FILES'][$attach_data])) { echo '<result><status>WAIT</status></result>'; return; } $f =& $s['POSTFORM_TEMP_FILES'][$attach_data]; if ($f) {