当前位置: 首页>>代码示例>>PHP>>正文


PHP cleanname函数代码示例

本文整理汇总了PHP中cleanname函数的典型用法代码示例。如果您正苦于以下问题:PHP cleanname函数的具体用法?PHP cleanname怎么用?PHP cleanname使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cleanname函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: cleanname

            <!-- /.navbar-top-links -->
			<?php 
include 'navbar-top-links.php';
?>
            <!-- /.navbar-static-side -->
        </nav>

        <div id="page-wrapper">
						<?php 
include 'includes/run_check.php';
?>

            <div class="row">
                <div class="col-lg-12">
                    <h2 class="page-header">Set Alerts  - run: <?php 
echo cleanname($_SESSION['active_run_name']);
?>
</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <div id="messages"></div>
            <div class="row">
                <div class="col-lg-12">
			
			This feature will notify you of specific events occuring during the sequencing run. <br><br>This is a <strong>beta</strong> feature.<br><br> You can browse around the website once these parameters are set and notifications will appear on any page. However, these settings may not be remembered if you log out of the website.
            <br>

            As proof of principle we shall consider depth of coverage for the whole genome from template reads. This alert is persistent - it will remain untill dismissed (or you change pages...).
            
                <!-- /.col-lg-12 -->
开发者ID:JGI-Bioinformatics,项目名称:minoTour,代码行数:31,代码来源:set_alerts.php

示例2: PNotify

                //print $value2 . "<br>";
                if ($webnotify == 1) {
                    echo "<script type=\"text/javascript\" id=\"runscript\">\n\t\t\t\t\t\tnew PNotify({\n    \t\t\t\t\t\ttitle: 'Run Finished.',\n\t\t\t\t\t    \ttext: '" . cleanname($value2) . " has been completed.',\n    \t\t\t\t\t\ttype: 'info',\n\t\t\t\t\t    \thide: false\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t</script>";
                }
                if (isset($_SESSION['twittername'])) {
                    $message = "run finished.";
                    $postData = "twitteruser=" . $_SESSION['twittername'] . "&run=" . urlencode(cleanname($value2)) . "&message=" . urlencode($message);
                    //echo "alert ('".$postData."');";
                    // Get cURL resource
                    $curl = curl_init();
                    // Set some options - we are passing in a useragent too here
                    curl_setopt_array($curl, array(CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $twiturl . 'tweet.php?' . $postData, CURLOPT_USERAGENT => 'Codular Sample cURL Request'));
                    // Send the request & save response to $resp
                    $resp = curl_exec($curl);
                    // Close request to clear up some resources
                    curl_close($curl);
                }
                // Get cURL resource
                $curl = curl_init();
                $postData = "userid=" . urlencode($_SESSION['user_name']) . "&runname=" . urlencode(cleanname($value2));
                //echo $postData;
                // Set some options - we are passing in a useragent too here
                curl_setopt_array($curl, array(CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => 'http://www.nottingham.ac.uk/~plzloose/minoTourhome/runfinished.php?' . $postData, CURLOPT_USERAGENT => 'Codular Sample cURL Request'));
                // Send the request & save response to $resp
                $resp = curl_exec($curl);
                // Close request to clear up some resources
                curl_close($curl);
            }
        }
    }
}
开发者ID:sdh100shaun,项目名称:minoTour,代码行数:31,代码来源:alertcheck.php

示例3: checkuserruns

function checkuserruns()
{
    if (isset($_SESSION['user_login_status']) and $_SESSION['user_login_status'] == 1) {
        $db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
        if (!$db_connection->connect_errno) {
            $user_name = $_SESSION['user_name'];
            $sql = "select users.user_name,runname, activeflag from users inner join userrun using (user_id) inner join minIONruns where userrun.runindex=minIONruns.runindex and users.user_name = '" . $user_name . "';";
            $runs_available = $db_connection->query($sql);
            if ($runs_available->num_rows >= 1) {
                $runarray;
                foreach ($runs_available as $row) {
                    $runarray[$row['activeflag']][$row['runname']] = $row['user_name'];
                }
                echo "You have " . $runs_available->num_rows . " minION runs available to view.<br>\n";
                if (array_key_exists('1', $runarray)) {
                    echo "You have active runs available.<br>\n";
                    //foreach ($runarray as $runinfo) {
                    //	if ()
                    //}
                    $_SESSION['active_run_name'] = key($runarray[1]);
                    echo "The currently selected active run is " . cleanname(key($runarray[1])) . ".<br>\n";
                } else {
                    echo "You have no currently active runs.<br>\n";
                    unset($_SESSION['active_run_name']);
                }
            } else {
                echo "You have no minION runs available to view.<br>\n";
            }
        }
        return true;
    }
    return false;
}
开发者ID:sdh100shaun,项目名称:minoTour,代码行数:33,代码来源:functions.php

示例4: cleanname

?>
            <!-- /.navbar-top-links -->
			<?php 
include 'navbar-top-links.php';
?>
            <!-- /.navbar-static-side -->
        </nav>

        <div id="page-wrapper">
						<?php 
include 'includes/run_check.php';
?>
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">Previous Data Summary - run: <?php 
echo cleanname($_SESSION['focusrun']);
?>
</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
			<ul class="nav nav-pills">
			  <li><a href="previous_summary.php">Read Summaries</a></li>
			   <li><a href="previous_histogram.php">Read Histograms</a></li>
			  <li ><a href="previous_rates.php">Sequencing Rates</a></li>
			  <li ><a href="previous_pores.php">Pore Activity</a></li>
  			  <li ><a href="previous_quality.php">Read Quality</a></li>
  			  <li class="active"><a href="previous_coverage.php">Coverage Detail</a></li>
			</ul>
			
						<div class="panel panel-default">
开发者ID:JGI-Bioinformatics,项目名称:minoTour,代码行数:31,代码来源:previous_coverage.php

示例5: list

    list($iFilteredTotal) = $rResultFilterTotal->fetch_row();
    // Total data set length
    $sQuery = "SELECT COUNT(*) FROM `" . $sTable . "`";
    $rResultTotal = $db->query($sQuery) or die($db->error);
    list($iTotal) = $rResultTotal->fetch_row();
    /**
     * Output
     */
    $output = array("sEcho" => intval($input['sEcho']), "iTotalRecords" => $iTotal, "iTotalDisplayRecords" => $iFilteredTotal, "aaData" => array());
    while ($aRow = $rResult->fetch_assoc()) {
        $row = array();
        for ($i = 0; $i < $iColumnCount; $i++) {
            if ($aColumns[$i] == 'version') {
                // Special output formatting for 'version' column
                $row[] = $aRow[$aColumns[$i]] == '0' ? '-' : $aRow[$aColumns[$i]];
            } elseif ($aColumns[$i] == 'runname') {
                $row[] = cleanname($aRow[$aColumns[$i]]);
            } elseif ($aColumns[$i] != ' ') {
                // General output
                $row[] = $aRow[$aColumns[$i]];
            }
        }
        $output['aaData'][] = $row;
    }
    //$jsonstring = json_encode( $output );
    //$callback = $_GET['callback'];
    //echo $callback.'('.$jsonstring.');';
    echo json_encode($output);
} else {
    echo "ERROR";
}
开发者ID:Fredus14,项目名称:minoTour,代码行数:31,代码来源:data_table_active_runs.php

示例6: alerts

                $sqldeleteexecute = $mindb_connection->query($sqldelete);
                $sqlinsert = "insert into alerts (name,reference,twitterhandle,type,threshold,start,end,control,complete) values (" . $name . "," . $reference . "," . $twitterhandle . "," . $type . "," . $threshold . "," . $start . "," . $end . "," . $control . ",0);";
                $sqlinsertexecute = $mindb_connection->query($sqlinsert);
            } elseif ($name === "'genbarcodecoveragedelete'") {
                $sqldelete = "delete from alerts where name = 'genbarcodecoverage';";
                $sqldeleteexecute = $mindb_connection->query($sqldelete);
                //echo $sqldelete . "<br>";
            } elseif ($name === "'barcodecoveragedelete'") {
                $sqldelete = "delete from alerts where name = 'barcodecoverage';";
                $sqldeleteexecute = $mindb_connection->query($sqldelete);
                //echo $sqldelete . "<br>";
            } elseif ($name === "'referencecoveragedelete'") {
                //echo "YELLOW";
                $alert_index = substr($reference, 10, -1);
                $sqldelete = "delete from alerts where alert_index = " . $alert_index . ";";
                //echo $sqldelete . "<br>";
                $sqldeleteexecute = $mindb_connection->query($sqldelete);
                //echo $sqldelete . "<br>";
            } else {
                $sqlinsert = "insert into alerts (name,reference,twitterhandle,type,threshold,start,end,control,complete) values (" . $name . "," . $reference . "," . $twitterhandle . "," . $type . "," . $threshold . "," . $start . "," . $end . "," . $control . ",0);";
                //echo $sqlinsert;
                $sqlinsertexecute = $mindb_connection->query($sqlinsert);
            }
        }
        echo "<div class='alert alert-success alert-dismissible' role='alert'>  <button type='button' class='close' data-dismiss='alert'><span aria-hidden='true'>&times;</span><span class='sr-only'>Close</span></button>  <strong>Success!</strong> An alert has been set for the following run: " . cleanname($_SESSION['active_run_name']) . "<br> The alert is for {$name} on {$typeref} strands. </div>";
    } else {
        echo "<div class='alert alert-danger alert-dismissible' role='alert'>  <button type='button' class='close' data-dismiss='alert'><span aria-hidden='true'>&times;</span><span class='sr-only'>Close</span></button>  <strong>Failed!</strong> An alert has not been set. You should not normally see this message so a really unexpected error has occured.</div>";
    }
} else {
    echo "ERROR";
}
开发者ID:Fredus14,项目名称:minoTour,代码行数:31,代码来源:set_alerts.php

示例7: nav_id_filter

function nav_id_filter($id, $item)
{
    return 'nav-' . cleanname($item->title);
}
开发者ID:delfiramirez,项目名称:blograma-wp,代码行数:4,代码来源:functions.php

示例8: foreach

						<div class='modal-content'>
							<div class='modal-header'>
								<button type='button' class='close' data-dismiss='modal' aria-hidden='true'>&times;</button>
								<h4 class='modal-title' id='myModalLabel'>Start your minION</h4>
							</div>
							<div class='modal-body'>
								<div id='startminioninfo'>
									<p>This will attempt to restart your minION sequencer remotely.</p>

									<p>If you are sure you wish to do this select an available run script and click 'Start minION' below. Otherwise close this window.</p>
                                    <?php 
$availablescripts = "SELECT * FROM messages where message = 'runscript' order by message_index;";
$availablescriptsare = $mindb_connection->query($availablescripts);
if ($availablescriptsare->num_rows > 0) {
    foreach ($availablescriptsare as $row) {
        echo "\n                                            <div class='radio'>\n                                                <label>\n                                                    <input type='radio' name='scriptRadios' id='" . $row['param1'] . "' value='" . $row['param1'] . "' >\n                                                    " . cleanname($row['param1']) . ".py\n                                                </label>\n                                            </div>\n                                            ";
    }
} else {
    echo "Not Available.";
}
?>



								</div>
								<div id='startworking'>
									<p class='text-center'>We're working to restart your minION device. Please be patient and don't navigate away from this page.</p>
								    <p class='text-center'><img src='images/loader.gif' alt='loader'></p>
								</div>
								<div class='modal-footer'>
									<button type='button' class='btn btn-default' data-dismiss='modal'>Close</button>
开发者ID:JGI-Bioinformatics,项目名称:minoTour,代码行数:31,代码来源:live_interaction.php

示例9: foreach

            foreach ($currentbiasis as $row) {
                echo $row['param1'] . " mV";
            }
        } else {
            echo "Not Available";
        }
        echo "</td>\n  </tr>\n  <tr>\n    <td>Yield</td>\n    <td>";
        $currentyield = "SELECT * FROM messages where message = 'yield' order by message_index desc limit 1;";
        #echo $currentbias . "<br>";
        $currentyieldis = $mindb_connection2->query($currentyield);
        if ($currentyieldis->num_rows > 0) {
            foreach ($currentyieldis as $row) {
                echo $row['param1'];
            }
        } else {
            echo "Not Available.";
        }
        echo "</td>\n  </tr>\n\t\t\t\t</table>\n\n                <em>Available scripts are:</em><br>\n                ";
        $availablescripts = "SELECT * FROM messages where message = 'runscript' order by message_index;";
        #echo $currentbias . "<br>";
        $availablescriptsare = $mindb_connection2->query($availablescripts);
        if ($availablescriptsare->num_rows > 0) {
            foreach ($availablescriptsare as $row) {
                echo "->" . cleanname($row['param1']) . "<br>";
            }
        } else {
            echo "Not Available.";
        }
        echo "\n\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>";
    }
}
开发者ID:JGI-Bioinformatics,项目名称:minoTour,代码行数:31,代码来源:minknowinfo.php

示例10: sum

         }
     }
     if ($index['job'] == "basenotification") {
         $sql_template = "SELECT sum(length(sequence)) as bases FROM basecalled_" . $index['type'] . ";";
         $mindb_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, $index['database']);
         $template = $mindb_connection->query($sql_template);
         if ($template->num_rows >= 1) {
             foreach ($template as $row) {
                 if (($row['bases'] - $row['bases'] % $index['threshold']) / $index['threshold'] >= 1) {
                     $checkrunning = $index['database'] . "basecoverage" . $index['type'];
                     //echo $checkrunning;
                     $basecoveragetemp = $memcache->get("{$checkrunning}");
                     if (($row['bases'] - $row['bases'] % $index['threshold']) / $index['threshold'] > $basecoveragetemp) {
                         if (isset($index['twittername']) && $index['threshold'] >= 500000) {
                             $message = "Sequenced " . $index['threshold'] * (($row['bases'] - $row['bases'] % $index['threshold']) / $index['threshold']) . " bases on " . $index['type'];
                             $postData = "twitteruser=" . $_SESSION['twittername'] . "&run=" . urlencode(cleanname($index['database'])) . "&message=" . urlencode($message);
                             $curl = curl_init();
                             // Set some options - we are passing in a useragent too here
                             curl_setopt_array($curl, array(CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $twiturl . 'tweet.php?' . $postData, CURLOPT_USERAGENT => 'Codular Sample cURL Request'));
                             // Send the request & save response to $resp
                             $resp = curl_exec($curl);
                             // Close request to clear up some resources
                             curl_close($curl);
                         }
                         $memcache->set("{$checkrunning}", ($row['bases'] - $row['bases'] % $index['threshold']) / $index['threshold']);
                     }
                 }
             }
         }
     }
 }
开发者ID:Fredus14,项目名称:minoTour,代码行数:31,代码来源:alertcheck_background.php

示例11: foreach

 #echo $currentbias . "<br>";
 $currentsampleis = $mindb_connection2->query($currentsample);
 if ($currentsampleis->num_rows > 0) {
     foreach ($currentsampleis as $row) {
         echo $row['param1'];
     }
 } else {
     echo "Not Available";
 }
 echo "</td>\n  </tr>\n  <tr>\n    <td>Run Name</td>\n    <td>";
 $currentdataset = "SELECT * FROM messages where message = 'Dataset' order by message_index desc limit 1;";
 #echo $currentbias . "<br>";
 $currentdatasetis = $mindb_connection2->query($currentdataset);
 if ($currentdatasetis->num_rows > 0) {
     foreach ($currentdatasetis as $row) {
         echo cleanname($row['param1']);
     }
 } else {
     echo "Not Available";
 }
 echo "</td>\n  </tr>\n  <tr>\n    <td>Voltage Offset</td>\n    <td>";
 $currentbias = "SELECT * FROM messages where message = 'biasvoltage' order by message_index desc limit 1;";
 $currentbiasis = $mindb_connection2->query($currentbias);
 if ($currentbiasis->num_rows > 0) {
     foreach ($currentbiasis as $row) {
         echo $row['param1'] . " mV";
     }
 } else {
     echo "Not Available";
 }
 echo "</td>\n  </tr>\n  <tr>\n    <td>Yield</td>\n    <td>";
开发者ID:Fredus14,项目名称:minoTour,代码行数:31,代码来源:minknowinfo.php


注:本文中的cleanname函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。