Implement feature for deleting posts and improving ajax requests
This commit is contained in:
@@ -210,14 +210,13 @@
|
||||
Bitte erstelle dir entweder
|
||||
<a href="<?= base_url('login') ?>">kostenlos einen neuen Account</a>
|
||||
oder
|
||||
<a href="<?= base_url('login') ?>">melde dich an</a>.
|
||||
<a href="<?= base_url('login') ?>">melde dich an</a>
|
||||
.
|
||||
</div>
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
|
||||
var_dump($this->input->post('postMedia'));
|
||||
|
||||
$content = $this->input->post('content');
|
||||
if (strlen($content) >= 10000) {
|
||||
?>
|
||||
@@ -247,23 +246,25 @@
|
||||
}
|
||||
|
||||
$media = $this->input->post('postMedia');
|
||||
foreach ($media as $entry) {
|
||||
$image = str_replace(' ', '+', $entry['image']);
|
||||
$image = substr($image, strpos($image, ',') + 1);
|
||||
$image = base64_decode($image);
|
||||
if (!empty($media)) {
|
||||
foreach ($media as $entry) {
|
||||
$image = str_replace(' ', '+', $entry['image']);
|
||||
$image = substr($image, strpos($image, ',') + 1);
|
||||
$image = base64_decode($image);
|
||||
|
||||
$fileUrl = $this->FileModel->uploadFileByContent($image, $entry['name'], $entry['type'], $entry['size']);
|
||||
$fileUrl = $this->FileModel->uploadFileByContent($image, $entry['name'], $entry['type'], $entry['size']);
|
||||
|
||||
$this->PostsModel->addImageToPost($postID, $fileUrl);
|
||||
$this->PostsModel->addImageToPost($postID, $fileUrl);
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="alert alert-success" role="alert">
|
||||
<b>Dein Post wurde erfolgreich veröffentlicht!</b> Möchtest du nun deine Posts ansehen? <br>
|
||||
<button type="button" class="btn btn-sm btn-default" data-dismiss="modal">Nein</button>
|
||||
<a href='<?= base_url('user/' . $_SESSION['user']['username'] . '/posts') ?>' class='btn btn-sm btn-primary'>Ja</a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="alert alert-success" role="alert">
|
||||
<b>Dein Post wurde erfolgreich veröffentlicht!</b> Möchtest du nun deine Posts ansehen? <br>
|
||||
<button type="button" class="btn btn-sm btn-default" data-dismiss="modal">Nein</button>
|
||||
<a href='<?= base_url('user/' . $_SESSION['user']['username'] . '/posts') ?>' class='btn btn-sm btn-primary'>Ja</a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function followers($user = "")
|
||||
|
Reference in New Issue
Block a user