Ejemplo n.º 1
0
                    <a href="#" class="project-action-btn disabled" id="like_project" >Like</a>
                    <a href="#" class="project-action-btn disabled" id="comment_project" >Comment</a>
                    <a href="#" class="project-action-btn disabled" id="report_project" >Report</a>
                    <a href="#" class="project-action-btn" id="homeshare_project">Share</a>
                </div>

                <div class="homeshare-area share-active">
                    <?php 
if ($showProject) {
    $title = urlencode($project['project_title']);
    $url = urlencode(SITE_URL . '/view.php?pid=' . $project['project_id']);
    $summary = getFeaturingText($project['project_id']);
    $image = getFeaturingImage($project['project_id']);
    $imageUrl = '/uploads/images/<?php echo $image; ?>';
} else {
    $idea = getIdeaById(intval($_GET['iid']));
    $title = urlencode($idea['ideathread_title']);
    $url = urlencode(SITE_URL . '/view.php?pid=' . $idea['ideathread_id']);
    $summary = $idea['description'];
    //                        $imageUrl = '/uploads/images/<?php echo $image;
    if ($idea['thumbnail_img']) {
        $imageUrl = $idea['thumbnail_img'];
    } else {
        $imageUrl = '/uploads/avatars/nophoto.jpg';
    }
}
?>
                    <a class="project-action-btns"

                       href="http://www.facebook.com/sharer.php?s=100&amp;p[title]=<?php 
echo $title;
Ejemplo n.º 2
0
        ]
      }   
      ]
    });

    chart.render();
  }
  window.onload = loadChart;
  </script>
    <div class="container">
        <div class="row">
            <div class="box">
                <div class="col-lg-12">
                    <hr>
                    <h2 class="intro-text text-center"><strong><?php 
$idea = getIdeaById($_GET['id']);
$name = $idea['Idea']['nome'];
echo $name;
?>
</strong>
                    </h2>
                    <hr>
                </div>
                <div class="col-lg-6 text-center">
                    <?php 
$imPath = $idea['Idea']['imPath'];
?>
                    <img class="img-responsive img-border img-full" src="<?php 
echo $imPath;
?>
" alt="">
Ejemplo n.º 3
0
    <div class="inner-page-wrapper">

    <div class="project inner-page content">

        <?php 
include DIR_INCLUDE . 'left_nav.php';
?>


        <div class="main-content">


            <?php 
if (isset($_GET['ideathread_id'])) {
    $id = intval($_GET['ideathread_id']);
    $idea = getIdeaById($id);
    if (!empty($idea)) {
        require DIR_INCLUDE . 'idea_details.php';
    } else {
        ?>
            <div class="content-block">
                <div class="content-title">Ideathread not found</div>
                <?php 
    }
}
?>

            </div>


        </div> <!-- account inner-page content -->
Ejemplo n.º 4
0
<?php

/** 
 * @author Amedeo Leo
 */
session_start();
require 'manageDB.php';
$idButton = $_POST['idButton'];
$idIdea = $_POST['idIdea'];
$idUser = $_SESSION['email'];
if ($idButton = "followIt") {
    $result = insertFollower($idUser, $idIdea);
    if ($result == NULL) {
        return "Non puoi seguire una tua idea";
    } else {
        $user_follower = getUserById($idUser);
        $nameSurname = $user_follower['User']['name'] . " " . $user_follower['User']['surname'];
        $idea = getIdeaById($idIdea);
        $id_user_idea = $idea['User']['email'];
        $text_idea = $idea['Idea']['nome'];
        $text = "La tua idea " . $text_idea . " ha un nuovo follower: {$nameSurname}.";
        $mail_destinatario = $id_user_idea;
        $mail_oggetto = "La tua idea " . $text_idea . " ha un nuovo follower: {$nameSurname}.";
        $title = "Nuovo follower per la idea " . $text_idea;
        $body = $text;
        sendMail($mail_destinatario, $mail_oggetto, $title, $body);
        $text = "La tua idea " . $text_idea . " ha un nuovo follower!";
        insertNotice($id_user_idea, $idIdea, $text, "Follower");
        echo "<button type='button' onClick='notFollowIt();' id='notFollowIt' class='btn btn-default btn-lg' style='background: red'><span class='glyphicon glyphicon-remove' aria-hidden='true' ></span> Unfollow</button>";
    }
}
Ejemplo n.º 5
0
/** 
 * @author Amedeo Leo
 */
function insertFinancier($idIdea, $idFinancier)
{
    $date = getTimeAndDate();
    $idea = getIdeaById($idIdea);
    if ($idea['Idea']['idUser'] == $idFinancier) {
        return "Non puoi finanziare una tua idea";
    } else {
        if ($idea['Idea']['financier'] != NULL) {
            return "Quest'idea ha già un finanziatore";
        } else {
            $conn = getConn();
            $sql = "UPDATE idea SET financier = '{$idFinancier}', dateOfFinancing = '{$date}' WHERE id = '{$idIdea}'";
            $result = mysqli_query($conn, $sql);
            mysqli_close($conn);
            return "ok";
        }
    }
}