public function save(Request $request)
 {
     $this->validate($request, ['url' => 'required|string', 'metadata' => 'json', 'type_id' => 'integer|exists:flag_types,id', 'text' => 'string']);
     \DB::transaction(function () use($request) {
         $flag = Flag::create($request->all() + ['user_id' => auth()->id()]);
         $object = new Stream_Flag(['id' => $flag->id, 'displayName' => excerpt($request->text)]);
         stream(Stream_Create::class, $object);
     });
 }
function doc()
{
    extract($_REQUEST);
    // Retrieve file
    db_conn("cubit");
    $sql = "SELECT * FROM document_files WHERE id='{$id}'";
    $jf_rslt = db_exec($sql) or errDie("Unable to retrieve jobcard files.");
    $jf_data = pg_fetch_array($jf_rslt);
    stream($jf_data["filename"], base64_decode($jf_data["file"]), $jf_data["type"]);
}
 /**
  * Wylogowanie uzytkownika
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function signout()
 {
     $user = User::findOrFail(auth()->user()->id);
     $user->ip = request()->ip();
     $user->browser = request()->browser();
     // metoda browser() nie jest dostepna dla testow funkcjonalnych
     $user->visited_at = Carbon::now();
     $user->visits = auth()->user()->visits + 1;
     $user->save();
     stream(Stream_Logout::class);
     Auth::logout();
     return back();
 }
Example #4
0
function printDload($docid)
{
    # Connect to database
    db_conn("cubit");
    # Query server
    $i = 0;
    $sql = "SELECT * FROM documents WHERE docid = '{$docid}' AND div = '" . USER_DIV . "'";
    $docRslt = db_exec($sql) or errDie("Unable to retrieve Documents from database.");
    if (pg_numrows($docRslt) < 1) {
        return "<li>Document not found";
    }
    $doc = pg_fetch_array($docRslt);
    $output = doclib_decode($doc['docu']);
    stream($doc['filename'], $output, $doc['mimetype']);
}
Example #5
0
 public function testMultiSort()
 {
     $stream = stream(array(array(1, 3), array(2, 2), array(3, 1), array(4, 2), array(5, 2)))->sort(ComparatorFactory::create(function ($first, $second) {
         return $first[1] - $second[1];
     }))->sort(ComparatorFactory::create(function ($first, $second) {
         return $first[0] - $second[0];
     }));
     $this->assertEquals(array(3, 1), $stream->first());
     $this->assertEquals(array(1, 3), $stream->last());
     $stream->rewind();
     $stream->next();
     $this->assertEquals(array(2, 2), $stream->current());
     $stream->next();
     $this->assertEquals(array(4, 2), $stream->current());
     $stream->next();
     $this->assertEquals(array(5, 2), $stream->current());
 }
 /**
  * Obsluga formularza rejestracji uzytkownika
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function signup(Request $request)
 {
     $this->validate($request, ['name' => 'required|min:2|max:28|username|unique:users', 'email' => 'required|email|max:255|unique:users', 'password' => 'required|confirmed|min:3', 'human' => 'required']);
     DB::beginTransaction();
     try {
         $email = $request->input('email');
         $user = User::create(['name' => $request->input('name'), 'email' => $email, 'password' => bcrypt($request->input('password'))]);
         $actkey = Actkey::create(['actkey' => str_random(), 'user_id' => $user->id]);
         // taki format linku zachowany jest ze wzgledu na wsteczna kompatybilnosc.
         // z czasem mozemy zmienic ten format aby wskazywal na /User/Confirm/Email/<id>/<actkey>
         $url = route('user.email') . '?id=' . $user->id . '&actkey=' . $actkey->actkey;
         Mail::queue('emails.signup', ['url' => $url], function ($message) use($email) {
             $message->to($email);
             $message->subject('Dziękujemy za rejestrację. Potwierdź autentyczność swojego adresu e-mail');
         });
         Auth::login($user, true);
         stream(Stream_Create::class, new Stream_Person());
         DB::commit();
     } catch (\Exception $e) {
         DB::rollBack();
         throw $e;
     }
     return redirect()->intended(route('home'));
 }
Example #7
0
$sql2 = "SELECT count(*) as posts FROM comment WHERE {$get}!='' ";
$cntqu = mysql_query($sql2);
$cntrow = mysql_fetch_array($cntqu);
$page = ceil($cntrow['posts'] / POST_PER_PAGE);
while ($row = mysql_fetch_array($tname)) {
    $id = $row['uid'];
    $name = $row['name'];
    $kcom = $row['anew'];
    $kclg = $row['college'];
    $email = $row['email'];
    $strea = $row['stream'];
    if ($kcom != null) {
        if (isset($_SESSION['femail']) && $_SESSION['femail'] != "") {
            $kemail = $_SESSION['femail'];
            $ksetclg = $_SESSION['fclg'];
            $stre = stream($ksetclg);
        } else {
            $kemail = "";
        }
        if ($kemail == $email) {
            $delink = "<a href=\"delete.php?ud=" . $id . "\">Delete</a>";
        } else {
            $delink = "";
        }
        if ($strea == $stre) {
            $img = image($kclg);
            echo '<div class="media">
  <a class="pull-left" href="#">
    <img class="media-object" src="../assets/img/' . $img . '.jpg" alt="...">
  </a>
  <div class="media-body">
Example #8
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="niiith.php?clg=<?php 
echo news('Indian Institute of Technology(IIT) Guwahati');
?>
 &str=<?php 
echo stream('Indian Institute of Technology(IIT) Guwahati');
?>
">
              <h4>Post news about your college <small>  @ be responsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #9
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="nnalsar.php?clg=<?php 
echo news('ILS Law College ,Pune');
?>
 &str=<?php 
echo stream('ILS Law College ,Pune');
?>
">
              <h4>Post news about your college <small>  @ be rewsponsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #10
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="naiimsd.php?clg=<?php 
echo news('Armed Forces Medical College(AFMC) ,Pune');
?>
 &str=<?php 
echo stream('Armed Forces Medical College(AFMC) ,Pune');
?>
">
              <h4>Post news about your college <small>  @ be responsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #11
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="ncmcv.php?clg=<?php 
echo news('Kasturba Medical College ,Manipal');
?>
 &str=<?php 
echo stream('Kasturba Medical College ,Manipal');
?>
">
              <h4>Post news about your college <small>  @ be responsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #12
0
            pclose($temp);
        } elseif ($rate != 0) {
            $temp = @popen($mp3out, "r");
            while ($data = @fread($temp, $blocksize)) {
                echo $data;
            }
            pclose($temp);
        } elseif ($mode == 1) {
            $temp = @fopen($mp3out, "r");
            while (!feof($temp) && $totaldata <= $size) {
                $data = @fread($temp, $blocksize);
                echo $data;
                $totaldata += $blocksize;
            }
            fclose($temp);
        } else {
            $temp = @fopen($mp3out, "r");
            while (!feof($temp)) {
                $data = @fread($temp, $blocksize);
                echo $data;
            }
            fclose($temp);
        }
    }
    // end IF for verify IP
    exit;
}
fb("Now Playing: i=" . $_GET['i'] . ", b=" . $_GET['b'] . ", s=" . $_GET['s'] . ", u=" . $_GET['u'] . " on: " . $_SERVER['REMOTE_ADDR']);
// Play Now
stream($_GET['i'], $_GET['b'], $_GET['s'], $_GET['u'], $_SERVER['REMOTE_ADDR']);
Example #13
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="nnalsar.php?clg=<?php 
echo news('Faculty Of Law DU ,Delhi');
?>
 &str=<?php 
echo stream('Faculty Of Law DU ,Delhi');
?>
">
              <h4>Post news about your college <small>  @ be rewsponsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #14
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="niima.php?clg=<?php 
echo news('Management Development Institute(MDI) ,Gurgaon');
?>
 &str=<?php 
echo stream('Management Development Institute(MDI) ,Gurgaon');
?>
">
              <h4>Post news about your college <small>  @ be rewsponsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #15
0
$audio = $json['response'][0];
$fileName = $audio["artist"] . " - " . $audio["title"];
$audioUrl = $audio["url"];
$filePath = "dl/" . md5($audioId) . ".mp3";
//caching mp3s, md5 for unique audioIds
if (file_exists($filePath)) {
    if ($isStream) {
        stream($filePath, $fileName);
    } else {
        forceDownload($filePath, $fileName);
    }
    return;
} else {
    if (downloadFile($audioUrl, $filePath)) {
        if ($isStream) {
            stream($filePath, $fileName);
        } else {
            forceDownload($filePath, $fileName);
        }
    }
}
//Functions
/**
 * Download file with given name to given path
 * @param $url url to download
 * @param $path output filepath
 * @return true if success, else you know what
 */
function downloadFile($url, $path)
{
    $fp = fopen($path, 'wb');
Example #16
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="niima.php?clg=<?php 
echo news('Indian Institute Of Management(IIM) Lucknow');
?>
 &str=<?php 
echo stream('Indian Institute Of Management(IIM) Lucknow');
?>
">
              <h4>Post news about your college <small>  @ be rewsponsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #17
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="niiith.php?clg=<?php 
echo news('Indian Institute of Technology(IIT) Kharagpur');
?>
 &str=<?php 
echo stream('Indian Institute of Technology(IIT) Kharagpur');
?>
">
              <h4>Post news about your college <small>  @ be responsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #18
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="niiith.php?clg=<?php 
echo news('National Institute Of Technology(NIT) Warangal');
?>
 &str=<?php 
echo stream('National Institute Of Technology(NIT) Warangal');
?>
">
              <h4>Post news about your college <small>  @ be responsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #19
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="nnalsar.php?clg=<?php 
echo news('National Law University ,Jodhpur');
?>
 &str=<?php 
echo stream('National Law University ,Jodhpur');
?>
">
              <h4>Post news about your college <small>  @ be rewsponsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #20
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="naiimsd.php?clg=<?php 
echo news('Jawaharlal Institute of Postgraduate Medical Education and Research(JIPMER) ,Pondicherry');
?>
 &str=<?php 
echo stream('Jawaharlal Institute of Postgraduate Medical Education and Research(JIPMER) ,Pondicherry');
?>
">
              <h4>Post news about your college <small>  @ be responsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #21
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="niiith.php?clg=<?php 
echo news('Indian Institute of Technology(IIT) Roorkee');
?>
 &str=<?php 
echo stream('Indian Institute of Technology(IIT) Roorkee');
?>
">
              <h4>Post news about your college <small>  @ be responsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div></div>
 
</div>
Example #22
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="ncmcv.php?clg=<?php 
echo news('Mahatma Gandhi Institute of Medical Sciences ,Wardha');
?>
 &str=<?php 
echo stream('Mahatma Gandhi Institute of Medical Sciences ,Wardha');
?>
">
              <h4>Post news about your college <small>  @ be responsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
 public function save(PostRequest $request, $forum, $topic, $post = null)
 {
     $url = \DB::transaction(function () use($request, $forum, $topic, $post) {
         // parsing text and store it in cache
         $text = app()->make('Parser\\Post')->parse($request->text);
         // post has been modified...
         if ($post !== null) {
             $this->authorize('update', [$post, $forum]);
             $data = $request->only(['text', 'user_name']) + ['edit_count' => $post->edit_count + 1, 'editor_id' => auth()->id()];
             $post->fill($data)->save();
             $activity = Stream_Update::class;
             // user want to change the subject. we must update topics table
             if ($post->id === $topic->first_post_id) {
                 $path = str_slug($request->get('subject'), '_');
                 $topic->fill($request->all() + ['path' => $path])->save();
                 $this->topic->setTags($topic->id, $request->get('tag', []));
             }
         } else {
             $activity = Stream_Create::class;
             // create new post and assign it to topic. don't worry about the rest: trigger will do the work
             $post = $this->post->create($request->all() + ['user_id' => auth()->id(), 'topic_id' => $topic->id, 'forum_id' => $forum->id, 'ip' => request()->ip(), 'browser' => request()->browser(), 'host' => request()->server('SERVER_NAME')]);
             // get id of users that were mentioned in the text
             $usersId = (new Ref_Login())->grab($text);
             if ($usersId) {
                 app()->make('Alert\\Post\\Login')->with(['users_id' => $usersId, 'sender_id' => auth()->id(), 'sender_name' => $request->get('user_name', auth()->user()->name), 'subject' => excerpt($topic->subject, 48), 'excerpt' => excerpt($text), 'url' => route('forum.topic', [$forum->path, $topic->id, $topic->path], false)])->notify();
             }
         }
         $url = route('forum.topic', [$forum->path, $topic->id, $topic->path], false);
         $url .= '?p=' . $post->id . '#id' . $post->id;
         $object = (new Stream_Post(['url' => $url]))->map($post);
         stream($activity, $object, (new Stream_Topic())->map($topic, $forum));
         return $url;
     });
     return redirect()->to($url);
 }
Example #24
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="ncmcv.php?clg=<?php 
echo news('M.S. Ramaiah Medical College ,Banglore');
?>
 &str=<?php 
echo stream('M.S. Ramaiah Medical College ,Banglore');
?>
">
              <h4>Post news about your college <small>  @ be responsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #25
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="nnalsar.php?clg=<?php 
echo news('Symbiosis Society Law College ,Pune');
?>
 &str=<?php 
echo stream('Symbiosis Society Law College ,Pune');
?>
">
              <h4>Post news about your college <small>  @ be rewsponsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #26
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="naiimsd.php?clg=<?php 
echo news('Maulana Azad Medical College(MAMC) ,Delhi');
?>
 &str=<?php 
echo stream('Maulana Azad Medical College(MAMC) ,Delhi');
?>
">
              <h4>Post news about your college <small>  @ be responsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #27
0
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="naiimsd.php?clg=<?php 
echo news('All Indian Institute Of Medical Science(AIIMS) Delhi');
?>
 &str=<?php 
echo stream('All Indian Institute Of Medical Science(AIIMS) Delhi');
?>
">
              <h4>Post news about your college <small>  @ be rewsponsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
<?php 
Example #28
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="nnalsar.php?clg=<?php 
echo news('West Bengal National University of Juridical Sciences(NUJS) ,Kolkata');
?>
 &str=<?php 
echo stream('West Bengal National University of Juridical Sciences(NUJS) ,Kolkata');
?>
">
              <h4>Post news about your college <small>  @ be rewsponsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #29
0
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="nbitm.php?clg=<?php 
echo news('Indian Institute Of Information Technology(IIIT) Hyderabad');
?>
 &str=<?php 
echo stream('Indian Institute Of Information Technology(IIIT) Hyderabad');
?>
">
              <h4>Post news about your college <small>  @ be responsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
 
</div>
Example #30
0
//  |                                                                        |
//  | You should have received a copy of the GNU General Public License      |
//  | along with this program.  If not, see <http://www.gnu.org/licenses/>.  |
//  +------------------------------------------------------------------------+
//  +------------------------------------------------------------------------+
//  | stream.php                                                             |
//  +------------------------------------------------------------------------+
require_once 'include/initialize.inc.php';
require_once 'include/stream.inc.php';
require_once 'include/cache.inc.php';
$action = get('action');
$album_id = get('album_id');
if ($action == 'playlist') {
    playlist();
} elseif ($action == 'stream') {
    stream();
} elseif ($action == 'shareAlbum') {
    shareAlbum($album_id);
} else {
    message(__FILE__, __LINE__, 'error', '[b]Unsupported input value for[/b][br]action');
}
exit;
//  +------------------------------------------------------------------------+
//  | Playlist                                                               |
//  +------------------------------------------------------------------------+
function playlist()
{
    global $cfg, $db;
    $stream_id = get('stream_id');
    $track_id = get('track_id');
    $album_id = get('album_id');