Example #1
0
function debug($str)
{
    if (DEBUG) {
        if (function_exists('comment')) {
            print comment($str) . "\n";
        } else {
            print "Debug: {$str}\n";
        }
    }
}
function end_email()
{
    echo '</td>
		          </tr>
		        </table>
		      </center>
		    </td>
		  </tr>
		</table>';
    comment('End email content');
}
Example #3
0
function change_pass()
{
    global $txp_user;
    $message = '';
    $themail = fetch('email', 'txp_users', 'name', $txp_user);
    if (!empty($_POST["new_pass"])) {
        $NewPass = $_POST["new_pass"];
        $rs = safe_update("txp_users", "pass = password(lower('{$NewPass}'))", "name='{$txp_user}'");
        if ($rs) {
            $message .= gTxt('password_changed');
            if ($_POST['mailpassword'] == 1) {
                send_new_password($NewPass, $themail, $txp_user);
                $message .= sp . gTxt('and_mailed_to') . sp . $themail;
            }
            $message .= ".";
        } else {
            echo comment(mysql_error());
        }
        admin($message);
    }
}
Example #4
0
function change_pass()
{
    global $txp_user;
    extract(psa(array('new_pass', 'mail_password')));
    if (empty($new_pass)) {
        author_list(array(gTxt('password_required'), E_ERROR));
        return;
    }
    $hash = doSlash(txp_hash_password($new_pass));
    $rs = safe_update('txp_users', "pass = '{$hash}'", "name = '" . doSlash($txp_user) . "'");
    if ($rs) {
        $message = gTxt('password_changed');
        if ($mail_password) {
            $email = fetch('email', 'txp_users', 'name', $txp_user);
            send_new_password($new_pass, $email, $txp_user);
            $message .= sp . gTxt('and_mailed_to') . sp . $email;
        } else {
            echo comment(mysql_error());
        }
        $message .= '.';
        author_list($message);
    }
}
Example #5
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;
}
$se = 'coiitbhu';
echo '<a href=../reqc.php?ud=' . $se . '><font color="#3B5998"><small>View all</small></font></a>';
?>
  </div>
  <div class="panel-footer">
       <form class="form-horizontal" role="form" method="post" action="coiiith.php?clg=<?php 
echo comment('Indian Institute of Technology(IIT) BHU ,VARANASI');
?>
 &str=<?php 
echo stream('Indian Institute of Technology(IIT) BHU ,VARANASI');
?>
">
              <h4>Comment to ask or know about college <small>  @ feel free </small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="coiitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subciitk" value="comment">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 #6
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;
}
$se = 'comamcd';
echo '<a href=../reqc.php?ud=' . $se . '><font color="#3B5998"><small>View all</small></font></a>';
?>
  </div>
  <div class="panel-footer">
       <form class="form-horizontal" role="form" method="post" action="coaiimsd.php?clg=<?php 
echo comment('Maulana Azad Medical College(MAMC) ,Delhi');
?>
 &str=<?php 
echo stream('Maulana Azad Medical College(MAMC) ,Delhi');
?>
">
              <h4>Comment to ask or know about college <small>  @ feel free </small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="coiitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subciitk" value="comment">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>
     _hktsignupdata($aditi);
     break;
 case "login":
     _hklogindata($aditi);
     break;
 case "mobile_login":
     _hkmobilelogindata();
     break;
 case "logingrefresh":
     _hkloginrefreshdata();
     break;
 case "profile_update":
     _hkprofileupdatedata();
     break;
 case "comment":
     comment($aditi);
     break;
 case "rld":
     reload($aditi);
     break;
 case "statuspost":
     _hkstatuspostdata($aditi);
     break;
 case "update":
     _hkdesktopupdatedatat($aditi);
     break;
 case "current_mobile_update":
     _hkcurrentmobileupdatedata($aditi);
     break;
 case "mobile_update":
     _hkmobileupdatedata($aditi);
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 . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
$se = 'cokmcm';
echo '<a href=../reqc.php?ud=' . $se . '><font color="#3B5998"><small>View all</small></font></a>';
?>
  </div>
  <div class="panel-footer">
       <form class="form-horizontal" role="form" method="post" action="cocmcv.php?clg=<?php 
echo comment('Kasturba Medical College ,Manipal');
?>
 &str=<?php 
echo stream('Kasturba Medical College ,Manipal');
?>
">
              <h4>Comment to ask or know about college <small>  @ feel free </small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="coiitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subciitk" value="comment">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>
$a = article(array('fr'));
$t->is(resolver($a, 'foo')->hasTranslation($a, 'en'), false, '->hasTranslation() checks if record has not given translation');
$t->is(resolver($a, 'foo')->hasTranslation($a, 'fr'), true, '->hasTranslation() checks if record has not given translation');
// ->computeUris()
$t->diag('->computeUris()');
$t->is(resolver(article(array('en')), 'foo?slug=%slug%')->computeUris(), array('foo?slug=en-slug'), '->computeUris() computes i18n cache uri including field value in default language');
$t->is(resolver(article(array('fr')), 'foo?slug=%slug%')->computeUris(), array('foo?slug=fr-slug'), '->computeUris() computes i18n cache uri including field value in another language');
$t->is(resolver(article(array('en')), 'foo?slug=%slug%&author=%Author.name%')->computeUris(), array('foo?slug=en-slug&author=henry'), '->computeUris() computes cache uri including several fields from relations');
$t->is(resolver(article(array('en', 'fr')), 'foo?slug=%slug%')->computeUris(), array('foo?slug=en-slug', 'foo?slug=fr-slug'), '->computeUris() computes i18n cache uris including field value with multiple language');
$t->is(resolver(article(array('en', 'fr')), 'foo?sf_culture=en&slug=%slug%')->computeUris(), array('foo?sf_culture=en&slug=en-slug'), '->computeUris() computes i18n cache uris when sf_culture is set to default language');
$t->is(resolver(article(array('en', 'fr')), 'foo?sf_culture=fr&slug=%slug%')->computeUris(), array('foo?sf_culture=fr&slug=fr-slug'), '->computeUris() computes i18n cache uris when sf_culture is set to another language');
$t->is(resolver(article(array('en', 'fr')), 'foo?sf_culture=*&slug=%slug%')->computeUris(), array(0 => 'foo?sf_culture=*&slug=en-slug', 1 => 'foo?sf_culture=*&slug=fr-slug'), '->computeUris() computes i18n cache uris when sf_culture is set to any language');
$t->is(resolver(article(array('en', 'fr')), 'foo?slug=%slug%&author=%Author.name%')->computeUris(), array(0 => 'foo?slug=en-slug&author=henry', 1 => 'foo?slug=fr-slug&author=henry'), '->computeUris() computes cache uri including several fields from relations');
$t->is(resolver(comment(array('en')), 'foo?slug=%Article.slug%')->computeUris(), array('foo?slug=en-slug'), '->computeUris() computes i18n cache uri with a foreign relation value in default language');
$t->is(resolver(comment(array('fr')), 'foo?slug=%Article.slug%')->computeUris(), array('foo?slug=fr-slug'), '->computeUris() computes i18n cache uri with a foreign relation value in another language');
$t->is(resolver(comment(array('en', 'fr')), 'foo?slug=%Article.slug%')->computeUris(), array('foo?slug=en-slug', 'foo?slug=fr-slug'), '->computeUris() computes i18n cache uri with a foreign relation value in multiple language');
// Test Helpers
function article(array $langs = array())
{
    $article = new Article();
    $article->setAuthor(author('henry'));
    foreach ($langs as $lang) {
        $article->Translation[$lang]->fromArray(array('title' => 'Title in ' . $lang, 'slug' => $lang . '-slug'));
    }
    return $article;
}
function comment(array $articleLangs = array())
{
    $comment = new Comment();
    $comment->setAuthor(author('niko'));
    $comment->content = 'Booh.';
Example #10
0
function textpattern()
{
    global $pretext, $microstart, $prefs, $qcount, $production_status, $txptrace;
    $segment = gps('segment');
    extract($pretext);
    $html = safe_field('user_html', 'txp_page', "name='{$page}'");
    if (!$html) {
        exit(gTxt('unknown_section') . ' ' . $s);
    }
    $html = parse($html);
    $html = parse($html);
    // the function so nice, he ran it twice
    $html = !$segment ? $html : segmentPage($html);
    $html = $prefs['allow_page_php_scripting'] ? evalString($html) : $html;
    header("Content-type: text/html; charset=utf-8");
    echo $html;
    if (in_array($production_status, array('debug', 'testing'))) {
        $microdiff = getmicrotime() - $microstart;
        echo n, comment('Runtime: ' . substr($microdiff, 0, 6));
        echo n, comment('Queries: ' . $qcount);
        echo maxMemUsage('end of textpattern()', 1);
        if (!empty($txptrace) and is_array($txptrace)) {
            echo n, comment('txp tag trace: ' . n . join(n, $txptrace) . n);
        }
    }
}
Example #11
0
        define('TXP_UPDATE', 1);
        include txpath . '/update/_update.php';
    }
    load_elements($event);
    register_element_tabs();
    if (!empty($admin_side_plugins) and gps('event') != 'plugin') {
        load_plugins(1);
    }
    include txpath . '/lib/txplib_head.php';
    // ugly hack, for the people that don't update their admin_config.php
    // Get rid of this when we completely remove admin_config and move privs to db
    if ($event == 'list') {
        require_privs('article');
    } else {
        require_privs($event);
    }
    callback_event($event, $step, 1);
    // let elements override older /include/txp_foo.php admin pages
    if (!controller_name($event)) {
        $inc = txpath . '/include/txp_' . $event . '.php';
        if (is_readable($inc)) {
            include $inc;
        }
    }
    callback_event($event, $step, 0);
    $microdiff = getmicrotime() - $microstart;
    echo n . comment(gTxt('runtime') . ': ' . substr($microdiff, 0, 6));
    end_page();
} else {
    txp_die('DB-Connect was succesful, but the textpattern-table was not found.', '503 Service Unavailable');
}
Example #12
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;
}
$se = 'cofold';
echo '<a href=../reqc.php?ud=' . $se . '><font color="#3B5998"><small>View all</small></font></a>';
?>
  </div>
  <div class="panel-footer">
       <form class="form-horizontal" role="form" method="post" action="conalsar.php?clg=<?php 
echo comment('Faculty Of Law DU ,Delhi');
?>
 &str=<?php 
echo stream('Faculty Of Law DU ,Delhi');
?>
">
              <h4>Comment to ask or know about college <small>  @ feel free </small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="coiitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subciitk" value="comment">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 #13
0
        load_plugins(1);
    }
    // plugins may have altered privilege settings
    if (!defined('TXP_UPDATE_DONE') && !gps('event') && !empty($default_event) && has_privs($default_event)) {
        $event = $default_event;
    }
    // init private theme
    $theme = theme::init();
    include txpath . '/lib/txplib_head.php';
    // ugly hack, for the people that don't update their admin_config.php
    // Get rid of this when we completely remove admin_config and move privs to db
    if ($event == 'list') {
        require_privs('article');
    } else {
        require_privs($event);
    }
    callback_event($event, $step, 1);
    $inc = txpath . '/include/txp_' . $event . '.php';
    if (is_readable($inc)) {
        include $inc;
    }
    callback_event($event, $step, 0);
    $microdiff = getmicrotime() - $microstart;
    end_page();
    echo n . comment(gTxt('runtime') . ': ' . substr($microdiff, 0, 6));
    if (is_callable('memory_get_peak_usage')) {
        echo n . comment(sprintf('Memory: %sKb', ceil(memory_get_peak_usage(true) / 1024)));
    }
} else {
    txp_die('DB-Connect was successful, but the textpattern-table was not found.', '503 Service Unavailable');
}
Example #14
0
 <?php 
    echo hyperlink("/", "Collins Quarter site &rarr;");
    ?>
 <?php 
    echo hyperlink("/admin/logout/", "Log Out");
    ?>
</div>
    <?php 
}
?>
      <br class="hurdle" />
    </div>
    
    
    <?php 
echo comment("Error list:");
?>
    <?php 
echo $backend->list_notices();
?>
    
    <div id="content">
    <?php 
echo $page_content;
?>
    </div>
    
    <div id="footer">
      Built on Seamonster by <a href="http://www.barkingsparrows.com">Barking Sparrows</a>.
    </div>
    
Example #15
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;
}
$se = 'coilsp';
echo '<a href=../reqc.php?ud=' . $se . '><font color="#3B5998"><small>View all</small></font></a>';
?>
  </div>
  <div class="panel-footer">
       <form class="form-horizontal" role="form" method="post" action="conalsar.php?clg=<?php 
echo comment('ILS Law College ,Pune');
?>
 &str=<?php 
echo stream('ILS Law College ,Pune');
?>
">
              <h4>Comment to ask or know about college <small>  @ feel free </small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="coiitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subciitk" value="comment">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 #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;
}
$se = 'coiitg';
echo '<a href=../reqc.php?ud=' . $se . '><font color="#3B5998"><small>View all</small></font></a>';
?>
  </div>
  <div class="panel-footer">
       <form class="form-horizontal" role="form" method="post" action="coiiith.php?clg=<?php 
echo comment('Indian Institute of Technology(IIT) Guwahati');
?>
&str=<?php 
echo stream('Indian Institute of Technology(IIT) Guwahati');
?>
">
              <h4>Comment to ask or know about college <small>  @ feel free </small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="coiitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subciitk" value="comment">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>
function zem_admin_test_lifecycle($event, $step)
{
    // Enable/disable this plugin, then view source to see the output.
    echo comment("{$event} {$step}") . n;
}
Example #18
0
function textpattern()
{
    global $pretext, $microstart, $prefs, $qcount, $production_status, $txptrace, $siteurl;
    callback_event('textpattern');
    if ($pretext['status'] == '404') {
        txp_die(gTxt('404_not_found'), '404');
    }
    $html = safe_field('user_html', 'txp_page', "name='" . doSlash($pretext['page']) . "'");
    if (!$html) {
        txp_die(gTxt('unknown_section'), '404');
    }
    set_error_handler("tagErrorHandler");
    $GLOBALS['pretext']['secondpass'] = false;
    $html = parse($html);
    $GLOBALS['pretext']['secondpass'] = true;
    $GLOBALS['txptrace'][] = " secondpass \r\n";
    $html = parse($html);
    // the function so nice, he ran it twice
    restore_error_handler();
    $html = $prefs['allow_page_php_scripting'] ? evalString($html) : $html;
    header("Content-type: text/html; charset=utf-8");
    echo $html;
    if (in_array($production_status, array('debug', 'testing'))) {
        $microdiff = getmicrotime() - $microstart;
        echo n, comment('Runtime: ' . substr($microdiff, 0, 6));
        echo n, comment('Queries: ' . $qcount);
        echo maxMemUsage('end of textpattern()', 1);
        if (!empty($txptrace) and is_array($txptrace)) {
            echo n, comment('txp tag trace: ' . n . join(n, $txptrace) . n);
        }
    }
}
Example #19
0
                 # Use forward slash only
                 $value = str_replace('\\', '/', $value);
                 # Add trailing slash
                 if (substr($value, -1) && substr($value, -1) != '/') {
                     $value .= '/';
                 }
             }
             # Filter it according to desired var type
             $value = filter($value, $option['type']);
             # Add any relativeness
             if ($option->relative && $input->{'pRelative_' . $key}) {
                 $value = $option->relative['to'] . ' . ' . $value;
             }
         }
         # Add to file (commented description and $CONFIG value)
         $toWrite .= NL . comment($option->desc) . NL;
         if ($key == 'enable_blockscript' && $value == 'true') {
             $value = 'false';
             if (function_exists('ioncube_loader_version') && file_exists($_SERVER['DOCUMENT_ROOT'] . '/blockscript/detector.php')) {
                 $value = 'true';
             }
         }
         $toWrite .= '$CONFIG[' . quote($key) . '] = ' . $value . ';' . NL;
     }
 }
 # Extract any preserved details
 $file = file_get_contents(ADMIN_GLYPE_SETTINGS);
 # And add to file
 if ($tmp = strpos($file, '//---PRESERVE ME---')) {
     $toWrite .= NL . substr($file, $tmp);
 }
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;
}
$se = 'cobitm';
echo '<a href=../reqc.php?ud=' . $se . '><font color="#3B5998"><small>View all</small></font></a>';
?>
  </div>
  <div class="panel-footer">
       <form class="form-horizontal" role="form" method="post" action="cobitm.php?clg=<?php 
echo comment('Indian Institute Of Information Technology(IIIT) Hyderabad');
?>
 &str=<?php 
echo stream('Indian Institute Of Information Technology(IIIT) Hyderabad');
?>
">
              <h4>Comment to ask or know about college <small>  @ feel free </small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="coiitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subciitk" value="comment">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 . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
$se = 'cosslc';
echo '<a href=../reqc.php?ud=' . $se . '><font color="#3B5998"><small>View all</small></font></a>';
?>
  </div>
  <div class="panel-footer">
       <form class="form-horizontal" role="form" method="post" action="conalsar.php?clg=<?php 
echo comment('Symbiosis Society Law College ,Pune');
?>
 &str=<?php 
echo stream('Symbiosis Society Law College ,Pune');
?>
">
              <h4>Comment to ask or know about college <small>  @ feel free </small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="coiitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subciitk" value="comment">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 #22
0
if (mysqli_num_rows($sql_last) > 0) {
    $last = mysqli_fetch_array($sql_last);
    do {
        echo '<article class="box post post-excerpt">
							<header>
								
								<h2><a href="' . $home_url . 'books/' . $last['URL'] . '">' . $last['Title'] . '</a></h2>
								
							</header>
							<div class="info">
									<span class="date"><span class="day">' . $last['Yaer'] . '</span></span>
								
								<ul class="stats">
									<li><a href="#" class="icon fa-book ">' . reading($last['Id']) . '</a></li>
									<li><a href="#" class="icon fa-check">' . done($last['Id']) . '</a></li>
									<li><a href="#" class="icon fa-comment">' . comment($last['Id']) . '</a></li>
									<li>' . author($last['AUTHOR_ID']) . '</li>
								</ul>
							</div>
							<table style="width:100%">
								<tr>
									<td style="max-width:30%;vertical-align: top;"><a href="' . $home_url . 'books/' . $last['URL'] . '" class="image featured"><img src="' . $home_url . 'images/books/' . $last['Image'] . '" alt="" /></a></td>
									
									<td style="padding-left:1em">' . $last['Description'] . '</td>
								</tr>
							</table>
							
							
						</article>
';
    } while ($last = mysqli_fetch_array($sql_last));
Example #23
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;
}
$se = 'coaiimsd';
echo '<a href=../reqc.php?ud=' . $se . '><font color="#3B5998"><small>View all</small></font></a>';
?>
  </div>
  <div class="panel-footer">
       <form class="form-horizontal" role="form" method="post" action="coaiimsd.php?clg=<?php 
echo comment('All Indian Institute Of Medical Science(AIIMS) Delhi');
?>
 &str=<?php 
echo stream('All Indian Institute Of Medical Science(AIIMS) Delhi');
?>
">
              <h4>Comment to ask or know about college <small>  @ feel free </small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="coiitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subciitk" value="comment">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 #24
0
    }
    if (!empty($admin_side_plugins) and gps('event') != 'plugin') {
        load_plugins(1);
    }
    // plugins may have altered privilege settings
    if (!defined('TXP_UPDATE_DONE') && !gps('event') && !empty($default_event) && has_privs($default_event)) {
        $event = $default_event;
    }
    // init private theme
    $theme = theme::init();
    include txpath . '/lib/txplib_head.php';
    require_privs($event);
    callback_event($event, $step, 1);
    $inc = txpath . '/include/txp_' . $event . '.php';
    if (is_readable($inc)) {
        include $inc;
    }
    callback_event($event, $step, 0);
    end_page();
    $microdiff = substr(getmicrotime() - $microstart, 0, 6);
    $memory_peak = is_callable('memory_get_peak_usage') ? ceil(memory_get_peak_usage(true) / 1024) : '-';
    if ($app_mode != 'async') {
        echo n . comment(gTxt('runtime') . ': ' . $microdiff);
        echo n . comment(sprintf('Memory: %sKb', $memory_peak));
    } else {
        header("X-Textpattern-Runtime: {$microdiff}");
        header("X-Textpattern-Memory: {$memory_peak}");
    }
} else {
    txp_die('DB-Connect was successful, but the textpattern-table was not found.', '503 Service Unavailable');
}
function ign_changePass()
{
    global $ign_user, $ign_user_db;
    $message = '';
    $themail = fetch('email', $ign_user_db, 'name', $ign_user);
    if (!empty($_POST["new_pass"])) {
        $NewPass = $_POST["new_pass"];
        if (safe_update($ign_user_db, "pass = password(lower('{$NewPass}'))", "name='{$ign_user}'")) {
            $message .= gTxt('password_changed');
            if ($_POST['mailpassword'] == 1) {
                ign_sendNewPassword($NewPass, $themail, $ign_user);
                $message .= sp . gTxt('and_mailed_to') . sp . $themail;
            }
            $message .= ".";
        } else {
            echo comment(mysql_error());
        }
        ign_admin($message);
    }
}
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;
}
$se = 'coiitr';
echo '<a href=../reqc.php?ud=' . $se . '><font color="#3B5998"><small>View all</small></font></a>';
?>
  </div>
  <div class="panel-footer">
       <form class="form-horizontal" role="form" method="post" action="coiiith.php?clg=<?php 
echo comment('Indian Institute of Technology(IIT) Roorkee');
?>
 &str=<?php 
echo stream('Indian Institute of Technology(IIT) Roorkee');
?>
">
              <h4>Comment to ask or know about college <small>  @ feel free </small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="coiitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subciitk" value="comment">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
              <button type="submit" name="submit">comment</button>
</td>
</tr>
 <tr>
             <td>
              <input type="hidden" name="ad_id" value="<?php 
echo $_GET['adventure'];
?>
" />
</td>
</tr>
 <tr>
             <td>
              <input type="hidden" name="us_name" value="<?php 
echo $_SESSION['username'];
?>
" />
</td>
</tr>
</table>
</form>

<p><h3>All Comments</h3></p>
<?php 
echo comment();
if (isset($_SESSION)) {
}
?>

<?php 
include "templates/footer.php";
    sign_up($_POST);
    die;
}
//post a message
if (isset($_POST['action']) && $_POST['action'] == 'message') {
    message($_POST);
    die;
}
//delete a message
if (isset($_POST['action']) && $_POST['action'] == 'delete') {
    delete($_POST);
    die;
}
//post a comment
if (isset($_POST['action']) && $_POST['action'] == 'comment') {
    comment($_POST);
    die;
}
//logout
if (isset($_POST['action']) && $_POST['action'] == 'logout') {
    session_destroy();
    header('location:index.php');
    die;
}
function login($post)
{
    //escape!
    // global $connection;
    // $esc_email=mysqli_real_escape_string($connection,$post['email']);
    // $esc_password=mysqli_real_escape_string($connection, $post['password']);
    // $query="SELECT * FROM users WHERE users.password='{$esc_password}' AND users.email='{$esc_email}'";
Example #29
0
function maxMemUsage($message = 'none', $returnit = 0)
{
    static $memory_top = 0;
    static $memory_message;
    if (is_callable('memory_get_usage')) {
        $memory_now = memory_get_usage();
        if ($memory_now > $memory_top) {
            $memory_top = $memory_now;
            $memory_message = $message;
        }
    }
    if ($returnit != 0) {
        if (is_callable('memory_get_usage')) {
            return n . comment(sprintf('Memory: %sKb, %s', ceil($memory_top / 1024), $memory_message));
        } else {
            return n . comment('Memory: no info available');
        }
    }
}
Example #30
0
function textpattern()
{
    global $pretext, $microstart, $prefs, $qcount, $qtime, $production_status, $txptrace, $siteurl, $has_article_tag;
    $has_article_tag = false;
    callback_event('textpattern');
    if ($pretext['status'] == '404') {
        txp_die(gTxt('404_not_found'), '404');
    }
    if ($pretext['status'] == '410') {
        txp_die(gTxt('410_gone'), '410');
    }
    $html = safe_field('user_html', 'txp_page', "name='" . doSlash($pretext['page']) . "'");
    if (!$html) {
        txp_die(gTxt('unknown_section'), '404');
    }
    // useful for clean urls with error-handlers
    txp_status_header('200 OK');
    trace_add('[' . gTxt('page') . ': ' . $pretext['page'] . ']');
    set_error_handler("tagErrorHandler");
    $pretext['secondpass'] = false;
    $html = parse($html);
    $pretext['secondpass'] = true;
    trace_add('[ ~~~ ' . gTxt('secondpass') . ' ~~~ ]');
    $html = parse($html);
    // the function so nice, he ran it twice
    if ($prefs['allow_page_php_scripting']) {
        $html = evalString($html);
    }
    // make sure the page has an article tag if necessary
    if (!$has_article_tag and $production_status != 'live' and (!empty($pretext['id']) or !empty($pretext['c']) or !empty($pretext['q']) or !empty($pretext['pg']))) {
        trigger_error(gTxt('missing_article_tag', array('{page}' => $pretext['page'])));
    }
    restore_error_handler();
    header("Content-type: text/html; charset=utf-8");
    echo $html;
    if (in_array($production_status, array('debug', 'testing'))) {
        $microdiff = getmicrotime() - $microstart;
        echo n, comment('Runtime:    ' . substr($microdiff, 0, 6));
        echo n, comment('Query time: ' . sprintf('%02.6f', $qtime));
        echo n, comment('Queries: ' . $qcount);
        echo maxMemUsage('end of textpattern()', 1);
        if (!empty($txptrace) and is_array($txptrace)) {
            echo n, comment('txp tag trace: ' . n . str_replace('--', '&shy;&shy;', join(n, $txptrace)) . n);
        }
        // '&shy;&shy;' is *no* tribute to Kajagoogoo, but an attempt to avoid prematurely terminating HTML comments
    }
    callback_event('textpattern_end');
}